class Province {
  String? code;
  String? name;
  String? nameEn;
  String? fullName;
  String? fullNameEn;
  String? codeName;
  String? parent;
  String? type;

  Province(
      {this.code,
      this.name,
      this.nameEn,
      this.fullName,
      this.fullNameEn,
      this.codeName,
      this.parent,
      this.type});
  
  Province.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'];
    parent = json['parent'];
    type = json['type'];
  }

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

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

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