achievement_detail_info.dart 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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 ? new AchieveDetailInfoData.fromJson(json['data']) : null;
  101. }
  102. Map<String, dynamic> toJson() {
  103. final Map<String, dynamic> data = new Map<String, dynamic>();
  104. data['result'] = this.result;
  105. data['code'] = this.code;
  106. data['msg'] = this.msg;
  107. if (this.data != null) {
  108. data['data'] = this.data.toJson();
  109. }
  110. return data;
  111. }
  112. }
  113. class AchieveDetailInfoData {
  114. int id;
  115. int seriesId;
  116. String logo;
  117. String name;
  118. int rewardExp;
  119. int rewardScore;
  120. int conditionCount;
  121. String createdAt;
  122. int nextRewardExp;
  123. int nextRewardScore;
  124. int nextConditionCount;
  125. int conditionProgress;
  126. List<Achievement> relateAchievements;
  127. String conditionDetail;
  128. String conditionMeasure;
  129. AchieveDetailInfoData(
  130. {this.id,
  131. this.seriesId,
  132. this.logo,
  133. this.name,
  134. this.rewardExp,
  135. this.rewardScore,
  136. this.conditionCount,
  137. this.createdAt,
  138. this.nextRewardExp,
  139. this.nextRewardScore,
  140. this.nextConditionCount,
  141. this.conditionProgress,
  142. this.relateAchievements,
  143. this.conditionDetail,
  144. this.conditionMeasure});
  145. AchieveDetailInfoData.fromJson(Map<String, dynamic> json) {
  146. id = json['id'];
  147. seriesId = json['series_id'];
  148. logo = json['logo'];
  149. name = json['name'];
  150. rewardExp = json['reward_exp'];
  151. rewardScore = json['reward_score'];
  152. conditionCount = json['condition_count'];
  153. createdAt = json['created_at'];
  154. nextRewardExp = json['next_reward_exp'];
  155. nextRewardScore = json['next_reward_score'];
  156. nextConditionCount = json['next_condition_count'];
  157. conditionProgress = json['condition_progress'];
  158. if (json['relate_achievements'] != null) {
  159. relateAchievements = new List<Achievement>();
  160. json['relate_achievements'].forEach((v) {
  161. relateAchievements.add(new Achievement.fromJson(v));
  162. });
  163. }
  164. conditionDetail = json['condition_detail'];
  165. conditionMeasure = json['condition_measure'];
  166. }
  167. Map<String, dynamic> toJson() {
  168. final Map<String, dynamic> data = new Map<String, dynamic>();
  169. data['id'] = this.id;
  170. data['series_id'] = this.seriesId;
  171. data['logo'] = this.logo;
  172. data['name'] = this.name;
  173. data['reward_exp'] = this.rewardExp;
  174. data['reward_score'] = this.rewardScore;
  175. data['condition_count'] = this.conditionCount;
  176. data['created_at'] = this.createdAt;
  177. data['next_reward_exp'] = this.nextRewardExp;
  178. data['next_reward_score'] = this.nextRewardScore;
  179. data['next_condition_count'] = this.nextConditionCount;
  180. data['condition_progress'] = this.conditionProgress;
  181. if (this.relateAchievements != null) {
  182. data['relate_achievements'] =
  183. this.relateAchievements.map((v) => v.toJson()).toList();
  184. }
  185. data['condition_detail'] = this.conditionDetail;
  186. data['condition_measure'] = this.conditionMeasure;
  187. return data;
  188. }
  189. }
  190. class RelateAchievements {
  191. int id;
  192. int seriesId;
  193. String logo;
  194. String name;
  195. int rewardExp;
  196. int rewardScore;
  197. int conditionCount;
  198. Null createdAt;
  199. RelateAchievements(
  200. {this.id,
  201. this.seriesId,
  202. this.logo,
  203. this.name,
  204. this.rewardExp,
  205. this.rewardScore,
  206. this.conditionCount,
  207. this.createdAt});
  208. RelateAchievements.fromJson(Map<String, dynamic> json) {
  209. id = json['id'];
  210. seriesId = json['series_id'];
  211. logo = json['logo'];
  212. name = json['name'];
  213. rewardExp = json['reward_exp'];
  214. rewardScore = json['reward_score'];
  215. conditionCount = json['condition_count'];
  216. createdAt = json['created_at'];
  217. }
  218. Map<String, dynamic> toJson() {
  219. final Map<String, dynamic> data = new Map<String, dynamic>();
  220. data['id'] = this.id;
  221. data['series_id'] = this.seriesId;
  222. data['logo'] = this.logo;
  223. data['name'] = this.name;
  224. data['reward_exp'] = this.rewardExp;
  225. data['reward_score'] = this.rewardScore;
  226. data['condition_count'] = this.conditionCount;
  227. data['created_at'] = this.createdAt;
  228. return data;
  229. }
  230. }