123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import 'package:hengyi/generated/json/base/json_convert_content.dart';
- import 'package:hengyi/data/country_detail_entity.dart';
- CountryDetailEntity $CountryDetailEntityFromJson(Map<String, dynamic> json) {
- final CountryDetailEntity countryDetailEntity = CountryDetailEntity();
- final int? id = jsonConvert.convert<int>(json['id']);
- if (id != null) {
- countryDetailEntity.id = id;
- }
- final String? countryName = jsonConvert.convert<String>(json['country_name']);
- if (countryName != null) {
- countryDetailEntity.countryName = countryName;
- }
- final String? countryImgUrl = jsonConvert.convert<String>(json['country_img_url']);
- if (countryImgUrl != null) {
- countryDetailEntity.countryImgUrl = countryImgUrl;
- }
- final String? countryVisitVisaUrl = jsonConvert.convert<String>(json['country_visit_visa_url']);
- if (countryVisitVisaUrl != null) {
- countryDetailEntity.countryVisitVisaUrl = countryVisitVisaUrl;
- }
- final String? countryBusinessVisaUrl = jsonConvert.convert<String>(json['country_business_visa_url']);
- if (countryBusinessVisaUrl != null) {
- countryDetailEntity.countryBusinessVisaUrl = countryBusinessVisaUrl;
- }
- final String? countryContent = jsonConvert.convert<String>(json['country_content']);
- if (countryContent != null) {
- countryDetailEntity.countryContent = countryContent;
- }
- return countryDetailEntity;
- }
- Map<String, dynamic> $CountryDetailEntityToJson(CountryDetailEntity entity) {
- final Map<String, dynamic> data = <String, dynamic>{};
- data['id'] = entity.id;
- data['country_name'] = entity.countryName;
- data['country_img_url'] = entity.countryImgUrl;
- data['country_visit_visa_url'] = entity.countryVisitVisaUrl;
- data['country_business_visa_url'] = entity.countryBusinessVisaUrl;
- data['country_content'] = entity.countryContent;
- return data;
- }
|