region.m.dart 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import 'notification.m.dart';
  2. class RegionDTO extends BaseDTO{
  3. String? regionVersion;
  4. String? languageType;
  5. String? reginData;
  6. RegionDTO({
  7. this.regionVersion,
  8. this.languageType,
  9. this.reginData,
  10. DateTime? createTime,
  11. DateTime? updateTime,
  12. }) : super(
  13. createTime: createTime,
  14. updateTime: updateTime,
  15. );
  16. factory RegionDTO.fromJson(Map<String, dynamic> map) {
  17. return RegionDTO(
  18. regionVersion: map['RegionVersion'],
  19. languageType: map['LanguageType'],
  20. reginData: map['ReginData'],
  21. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  22. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  23. );
  24. }
  25. Map<String, dynamic> toJson() {
  26. final map = super.toJson();
  27. if (regionVersion != null)
  28. map['RegionVersion'] = regionVersion;
  29. if (languageType != null)
  30. map['LanguageType'] = languageType;
  31. if (reginData != null)
  32. map['ReginData'] = reginData;
  33. return map;
  34. }
  35. }
  36. class GetRegionsRequest {
  37. String? version;
  38. String? languageType;
  39. GetRegionsRequest({
  40. this.version,
  41. this.languageType,
  42. });
  43. factory GetRegionsRequest.fromJson(Map<String, dynamic> map) {
  44. return GetRegionsRequest(
  45. version: map['Version'],
  46. languageType: map['LanguageType'],
  47. );
  48. }
  49. Map<String, dynamic> toJson() {
  50. final map = Map<String, dynamic>();
  51. if (version != null) {
  52. map['Version'] = version;
  53. }
  54. if (languageType != null) {
  55. map['LanguageType'] = languageType;
  56. }
  57. return map;
  58. }
  59. }