class Ward {
  String? code;
  String? name;
  String? nameEn;
  String? fullName;
  String? fullNameEn;
  String? codeName;
  String? districtCode;
  String? type;

  Ward({
    this.code,
    this.name,
    this.nameEn,
    this.fullName,
    this.fullNameEn,
    this.codeName,
    this.districtCode,
    this.type,
  });

  Ward.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'];
    districtCode = json['parent'];
    type = json['type'];
  }

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

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

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