import 'package:hengyi/generated/json/base/json_field.dart'; import 'package:hengyi/generated/json/country_detail_entity.g.dart'; import 'dart:convert'; @JsonSerializable() class CountryDetailEntity { late int id; @JSONField(name: "country_name") late String countryName; @JSONField(name: "country_img_url") late String countryImgUrl; @JSONField(name: "country_visit_visa_url") late String countryVisitVisaUrl; @JSONField(name: "country_business_visa_url") late String countryBusinessVisaUrl; @JSONField(name: "country_content") late String countryContent; CountryDetailEntity(); factory CountryDetailEntity.fromJson(Map json) => $CountryDetailEntityFromJson(json); Map toJson() => $CountryDetailEntityToJson(this); @override String toString() { return jsonEncode(this); } }