ad_bean_entity.g.dart 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. import 'package:bbyyy/generated/json/base/json_convert_content.dart';
  2. import 'package:bbyyy/beans/ad_bean_entity.dart';
  3. AdBeanEntity $AdBeanEntityFromJson(Map<String, dynamic> json) {
  4. AdBeanEntity adBeanEntity = AdBeanEntity();
  5. var data = jsonConvert.convert<AdBeanData>(json['data']);
  6. if (data != null) {
  7. adBeanEntity.data = data;
  8. }
  9. var error = jsonConvert.convert<String>(json['error']);
  10. if (error != null) {
  11. adBeanEntity.error = error;
  12. }
  13. return adBeanEntity;
  14. }
  15. Map<String, dynamic> $AdBeanEntityToJson(AdBeanEntity entity) {
  16. final Map<String, dynamic> data = <String, dynamic>{};
  17. data['data'] = entity.data.toJson();
  18. data['error'] = entity.error;
  19. return data;
  20. }
  21. AdBeanData $AdBeanDataFromJson(Map<String, dynamic> json) {
  22. AdBeanData adBeanData = AdBeanData();
  23. var total = jsonConvert.convert<int>(json['total']);
  24. if (total != null) {
  25. adBeanData.total = total;
  26. }
  27. var data = jsonConvert.convertListNotNull<AdBeanDataData>(json['data']);
  28. if (data != null) {
  29. adBeanData.data = data;
  30. }
  31. return adBeanData;
  32. }
  33. Map<String, dynamic> $AdBeanDataToJson(AdBeanData entity) {
  34. final Map<String, dynamic> data = <String, dynamic>{};
  35. data['total'] = entity.total;
  36. data['data'] = entity.data.map((v) => v.toJson()).toList();
  37. return data;
  38. }
  39. AdBeanDataData $AdBeanDataDataFromJson(Map<String, dynamic> json) {
  40. AdBeanDataData adBeanDataData = AdBeanDataData();
  41. var id = jsonConvert.convert<int>(json['id']);
  42. if (id != null) {
  43. adBeanDataData.id = id;
  44. }
  45. var description = jsonConvert.convert<String>(json['description']);
  46. if (description != null) {
  47. adBeanDataData.description = description;
  48. }
  49. var linkId = jsonConvert.convert<int>(json['link_id']);
  50. if (linkId != null) {
  51. adBeanDataData.linkId = linkId;
  52. }
  53. var type = jsonConvert.convert<int>(json['type']);
  54. if (type != null) {
  55. adBeanDataData.type = type;
  56. }
  57. var createTime = jsonConvert.convert<String>(json['create_time']);
  58. if (createTime != null) {
  59. adBeanDataData.createTime = createTime;
  60. }
  61. var days = jsonConvert.convert<int>(json['days']);
  62. if (days != null) {
  63. adBeanDataData.days = days;
  64. }
  65. var userPic = jsonConvert.convert<String>(json['user_pic']);
  66. if (userPic != null) {
  67. adBeanDataData.userPic = userPic;
  68. }
  69. var userName = jsonConvert.convert<String>(json['user_name']);
  70. if (userName != null) {
  71. adBeanDataData.userName = userName;
  72. }
  73. var title = jsonConvert.convert<String>(json['title']);
  74. if (title != null) {
  75. adBeanDataData.title = title;
  76. }
  77. var linkType = jsonConvert.convert<int>(json['link_type']);
  78. if (linkType != null) {
  79. adBeanDataData.linkType = linkType;
  80. }
  81. var startDate = jsonConvert.convert<String>(json['start_date']);
  82. if (startDate != null) {
  83. adBeanDataData.startDate = startDate;
  84. }
  85. var userUid = jsonConvert.convert<int>(json['user_uid']);
  86. if (userUid != null) {
  87. adBeanDataData.userUid = userUid;
  88. }
  89. var coverPath = jsonConvert.convert<String>(json['cover_path']);
  90. if (coverPath != null) {
  91. adBeanDataData.coverPath = coverPath;
  92. }
  93. var pictures = jsonConvert.convert<String>(json['pictures']);
  94. if (pictures != null) {
  95. adBeanDataData.pictures = pictures;
  96. }
  97. var renewed = jsonConvert.convert<bool>(json['renewed']);
  98. if (renewed != null) {
  99. adBeanDataData.renewed = renewed;
  100. }
  101. var mobile = jsonConvert.convert<String>(json['mobile']);
  102. if (mobile != null) {
  103. adBeanDataData.mobile = mobile;
  104. }
  105. var onShow = jsonConvert.convert<bool>(json['on_show']);
  106. if (onShow != null) {
  107. adBeanDataData.onShow = onShow;
  108. }
  109. var paid = jsonConvert.convert<bool>(json['paid']);
  110. if (paid != null) {
  111. adBeanDataData.paid = paid;
  112. }
  113. return adBeanDataData;
  114. }
  115. Map<String, dynamic> $AdBeanDataDataToJson(AdBeanDataData entity) {
  116. final Map<String, dynamic> data = <String, dynamic>{};
  117. data['id'] = entity.id;
  118. data['description'] = entity.description;
  119. data['link_id'] = entity.linkId;
  120. data['type'] = entity.type;
  121. data['create_time'] = entity.createTime;
  122. data['days'] = entity.days;
  123. data['user_pic'] = entity.userPic;
  124. data['user_name'] = entity.userName;
  125. data['title'] = entity.title;
  126. data['link_type'] = entity.linkType;
  127. data['start_date'] = entity.startDate;
  128. data['user_uid'] = entity.userUid;
  129. data['cover_path'] = entity.coverPath;
  130. data['pictures'] = entity.pictures;
  131. data['renewed'] = entity.renewed;
  132. data['mobile'] = entity.mobile;
  133. data['on_show'] = entity.onShow;
  134. data['paid'] = entity.paid;
  135. return data;
  136. }