achievement_detail_info.dart 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. import 'package:sport/bean/rank_game_info.dart';
  2. import 'package:sport/bean/user.dart';
  3. //class AchieveDetailInfo {
  4. // int? result;
  5. // int? code;
  6. // String? msg;
  7. // AchieveDetailInfoData data;
  8. //
  9. // AchieveDetailInfo({this.result, this.code, this.msg, this.data});
  10. //
  11. // AchieveDetailInfo.fromJson(Map<String, dynamic> json) {
  12. // result = json['result'];
  13. // code = json['code'];
  14. // msg = json['msg'];
  15. // data = json['data'] != null ? new AchieveDetailInfoData.fromJson(json['data']) : null;
  16. // }
  17. //
  18. // Map<String, dynamic> toJson() {
  19. // final Map<String, dynamic> data = new Map<String, dynamic>();
  20. // data['result'] = this.result;
  21. // data['code'] = this.code;
  22. // data['msg'] = this.msg;
  23. // if (this.data != null) {
  24. // data['data'] = this.data!.toJson();
  25. // }
  26. // return data;
  27. // }
  28. //}
  29. //
  30. //class AchieveDetailInfoData {
  31. // int? id;
  32. // String? name;
  33. // String? logo;
  34. // int? conditionDuration;
  35. // int? sort;
  36. // int? seriesId;
  37. // int? rewardScore;
  38. // List<Achievement>? relateAchivements;
  39. // String? position;
  40. // String? createdAt;
  41. //
  42. // AchieveDetailInfoData(
  43. // {this.id,
  44. // this.name,
  45. // this.logo,
  46. // this.conditionDuration,
  47. // this.sort,
  48. // this.seriesId,
  49. // this.rewardScore,
  50. // this.relateAchivements,
  51. // this.position,
  52. // this.createdAt});
  53. //
  54. // AchieveDetailInfoData.fromJson(Map<String, dynamic> json) {
  55. // id = json['id'];
  56. // name = json['name'];
  57. // logo = json['logo'];
  58. // conditionDuration = json['condition_duration'];
  59. // sort = json['sort'];
  60. // seriesId = json['series_id'];
  61. // rewardScore = json['reward_score'];
  62. // if (json['relate_achivements'] != null) {
  63. // relateAchivements = new List<Achievement>?();
  64. // json['relate_achivements'].forEach((v) {
  65. // relateAchivements!.add(new Achievement.fromJson(v));
  66. // });
  67. // }
  68. // position = json['position'];
  69. // createdAt = json['created_at'];
  70. // }
  71. //
  72. // Map<String, dynamic> toJson() {
  73. // final Map<String, dynamic> data = new Map<String, dynamic>();
  74. // data['id'] = this.id;
  75. // data['name'] = this.name;
  76. // data['logo'] = this.logo;
  77. // data['condition_duration'] = this.conditionDuration;
  78. // data['sort'] = this.sort;
  79. // data['series_id'] = this.seriesId;
  80. // data['reward_score'] = this.rewardScore;
  81. // if (this.relateAchivements != null) {
  82. // data['relate_achivements'] =
  83. // this.relateAchivements!.map((v) => v.toJson()).toList();
  84. // }
  85. // data['position'] = this.position;
  86. // data['created_at'] = this.createdAt;
  87. // return data;
  88. // }
  89. //}
  90. class AchieveDetailInfo {
  91. int? result;
  92. int? code;
  93. String? msg;
  94. AchieveDetailInfoData? data;
  95. AchieveDetailInfo({this.result, this.code, this.msg, this.data});
  96. AchieveDetailInfo.fromJson(Map<String, dynamic> json) {
  97. result = json['result'];
  98. code = json['code'];
  99. msg = json['msg'];
  100. data = json['data'] != null
  101. ? new AchieveDetailInfoData.fromJson(json['data'])
  102. : null;
  103. }
  104. Map<String, dynamic> toJson() {
  105. final Map<String, dynamic> data = new Map<String, dynamic>();
  106. data['result'] = this.result;
  107. data['code'] = this.code;
  108. data['msg'] = this.msg;
  109. if (this.data != null) {
  110. data['data'] = this.data!.toJson();
  111. }
  112. return data;
  113. }
  114. }
  115. class AchieveDetailInfoData {
  116. int? id;
  117. int? seriesId;
  118. String? logo;
  119. String? name;
  120. int? rewardExp;
  121. int? rewardScore;
  122. int? conditionCount;
  123. String? createdAt;
  124. int? nextRewardExp;
  125. int? nextRewardScore;
  126. int? nextConditionCount;
  127. int? conditionProgress;
  128. List<Achievement>? relateAchievements;
  129. String? conditionDetail;
  130. String? conditionMeasure;
  131. AchieveDetailInfoData(
  132. {this.id,
  133. this.seriesId,
  134. this.logo,
  135. this.name,
  136. this.rewardExp,
  137. this.rewardScore,
  138. this.conditionCount,
  139. this.createdAt,
  140. this.nextRewardExp,
  141. this.nextRewardScore,
  142. this.nextConditionCount,
  143. this.conditionProgress,
  144. this.relateAchievements,
  145. this.conditionDetail,
  146. this.conditionMeasure});
  147. AchieveDetailInfoData.fromJson(Map<String, dynamic> json) {
  148. id = json['id'];
  149. seriesId = json['series_id'];
  150. logo = json['logo'];
  151. name = json['name'];
  152. rewardExp = json['reward_exp'];
  153. rewardScore = json['reward_score'];
  154. conditionCount = json['condition_count'];
  155. createdAt = json['created_at'];
  156. nextRewardExp = json['next_reward_exp'];
  157. nextRewardScore = json['next_reward_score'];
  158. nextConditionCount = json['next_condition_count'];
  159. conditionProgress = json['condition_progress'];
  160. if (json['relate_achievements'] != null) {
  161. relateAchievements = [];
  162. json['relate_achievements'].forEach((v) {
  163. relateAchievements!.add(Achievement.fromJson(v));
  164. });
  165. }
  166. conditionDetail = json['condition_detail'];
  167. conditionMeasure = json['condition_measure'];
  168. }
  169. Map<String, dynamic> toJson() {
  170. final Map<String, dynamic> data = new Map<String, dynamic>();
  171. data['id'] = this.id;
  172. data['series_id'] = this.seriesId;
  173. data['logo'] = this.logo;
  174. data['name'] = this.name;
  175. data['reward_exp'] = this.rewardExp;
  176. data['reward_score'] = this.rewardScore;
  177. data['condition_count'] = this.conditionCount;
  178. data['created_at'] = this.createdAt;
  179. data['next_reward_exp'] = this.nextRewardExp;
  180. data['next_reward_score'] = this.nextRewardScore;
  181. data['next_condition_count'] = this.nextConditionCount;
  182. data['condition_progress'] = this.conditionProgress;
  183. if (this.relateAchievements != null) {
  184. data['relate_achievements'] =
  185. this.relateAchievements!.map((v) => v.toJson()).toList();
  186. }
  187. data['condition_detail'] = this.conditionDetail;
  188. data['condition_measure'] = this.conditionMeasure;
  189. return data;
  190. }
  191. }
  192. class RelateAchievements {
  193. int? id;
  194. int? seriesId;
  195. String? logo;
  196. String? name;
  197. int? rewardExp;
  198. int? rewardScore;
  199. int? conditionCount;
  200. Null createdAt;
  201. RelateAchievements(
  202. {this.id,
  203. this.seriesId,
  204. this.logo,
  205. this.name,
  206. this.rewardExp,
  207. this.rewardScore,
  208. this.conditionCount,
  209. this.createdAt});
  210. RelateAchievements.fromJson(Map<String, dynamic> json) {
  211. id = json['id'];
  212. seriesId = json['series_id'];
  213. logo = json['logo'];
  214. name = json['name'];
  215. rewardExp = json['reward_exp'];
  216. rewardScore = json['reward_score'];
  217. conditionCount = json['condition_count'];
  218. createdAt = json['created_at'];
  219. }
  220. Map<String, dynamic> toJson() {
  221. final Map<String, dynamic> data = new Map<String, dynamic>();
  222. data['id'] = this.id;
  223. data['series_id'] = this.seriesId;
  224. data['logo'] = this.logo;
  225. data['name'] = this.name;
  226. data['reward_exp'] = this.rewardExp;
  227. data['reward_score'] = this.rewardScore;
  228. data['condition_count'] = this.conditionCount;
  229. data['created_at'] = this.createdAt;
  230. return data;
  231. }
  232. }