country_detail_entity.g.dart 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import 'package:hengyi/generated/json/base/json_convert_content.dart';
  2. import 'package:hengyi/data/country_detail_entity.dart';
  3. CountryDetailEntity $CountryDetailEntityFromJson(Map<String, dynamic> json) {
  4. final CountryDetailEntity countryDetailEntity = CountryDetailEntity();
  5. final int? id = jsonConvert.convert<int>(json['id']);
  6. if (id != null) {
  7. countryDetailEntity.id = id;
  8. }
  9. final String? countryName = jsonConvert.convert<String>(json['country_name']);
  10. if (countryName != null) {
  11. countryDetailEntity.countryName = countryName;
  12. }
  13. final String? countryImgUrl = jsonConvert.convert<String>(json['country_img_url']);
  14. if (countryImgUrl != null) {
  15. countryDetailEntity.countryImgUrl = countryImgUrl;
  16. }
  17. final String? countryVisitVisaUrl = jsonConvert.convert<String>(json['country_visit_visa_url']);
  18. if (countryVisitVisaUrl != null) {
  19. countryDetailEntity.countryVisitVisaUrl = countryVisitVisaUrl;
  20. }
  21. final String? countryBusinessVisaUrl = jsonConvert.convert<String>(json['country_business_visa_url']);
  22. if (countryBusinessVisaUrl != null) {
  23. countryDetailEntity.countryBusinessVisaUrl = countryBusinessVisaUrl;
  24. }
  25. final String? countryContent = jsonConvert.convert<String>(json['country_content']);
  26. if (countryContent != null) {
  27. countryDetailEntity.countryContent = countryContent;
  28. }
  29. return countryDetailEntity;
  30. }
  31. Map<String, dynamic> $CountryDetailEntityToJson(CountryDetailEntity entity) {
  32. final Map<String, dynamic> data = <String, dynamic>{};
  33. data['id'] = entity.id;
  34. data['country_name'] = entity.countryName;
  35. data['country_img_url'] = entity.countryImgUrl;
  36. data['country_visit_visa_url'] = entity.countryVisitVisaUrl;
  37. data['country_business_visa_url'] = entity.countryBusinessVisaUrl;
  38. data['country_content'] = entity.countryContent;
  39. return data;
  40. }