class District {
  String? code;
  String? name;
  String? nameEn;
  String? fullName;
  String? fullNameEn;
  String? codeName;
  String? provinceCode;
  String? type;

  District({
    this.code,
    this.name,
    this.nameEn,
    this.fullName,
    this.fullNameEn,
    this.codeName,
    this.provinceCode,
    this.type,
  });

  District.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    name = json['name'];
    nameEn = json['name_en'];
    fullName = json['full_name'];
    fullNameEn = json['full_name_en'];
    codeName = json['code_name'];
    provinceCode = json['parent'];
    type = json['type'];
  }

  static List<District> fromJsonList(List list) {
    return list.map((e) => District.fromJson(e)).toList();
  }

  static List<District> fromJsonDynamicList(List<dynamic> list) {
    return list.map((e) => District.fromJson(e)).toList();
  }

  // @override
  // String toString() => fullName!;
}
