feed_back.dart 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. import 'package:sport/provider/lib/view_state_model.dart';
  2. class FeedBackInfo {
  3. int? result;
  4. int? code;
  5. String? msg;
  6. List<FeedBackInfoData>? data;
  7. FeedBackInfo({this.result, this.code, this.msg, this.data});
  8. FeedBackInfo.fromJson(Map<String, dynamic> json) {
  9. result = json['result'];
  10. code = json['code'];
  11. msg = json['msg'];
  12. if (json['data'] != null) {
  13. data = <FeedBackInfoData>[];
  14. json['data'].forEach((v) {
  15. data!.add(new FeedBackInfoData.fromJson(v));
  16. });
  17. }
  18. }
  19. Map<String, dynamic> toJson() {
  20. final Map<String, dynamic> data = new Map<String, dynamic>();
  21. data['result'] = this.result;
  22. data['code'] = this.code;
  23. data['msg'] = this.msg;
  24. if (this.data != null) {
  25. data['data'] = this.data!.map((v) => v.toJson()).toList();
  26. }
  27. return data;
  28. }
  29. }
  30. class FeedBackInfoData {
  31. String? from;
  32. String? content;
  33. List<String>? images;
  34. String? createdAt;
  35. int createTime = 0;
  36. FeedBackInfoData(
  37. {this.from, this.content, this.images, this.createdAt, this.createTime = 0});
  38. FeedBackInfoData.fromJson(Map<String, dynamic> json) {
  39. from = json['from'];
  40. content = json['content'];
  41. images = json['images'].cast<String>();
  42. createdAt = json['createdAt'];
  43. createTime = json['createTime'] ?? 0;
  44. }
  45. Map<String, dynamic> toJson() {
  46. final Map<String, dynamic> data = new Map<String, dynamic>();
  47. data['from'] = this.from;
  48. data['content'] = this.content;
  49. data['images'] = this.images;
  50. data['createdAt'] = this.createdAt;
  51. data['createTime'] = this.createTime;
  52. return data;
  53. }
  54. }
  55. class FeedTypeInfo {
  56. int? result;
  57. int? code;
  58. String? msg;
  59. List<FeedTypeInfoData>? data;
  60. FeedTypeInfo({this.result, this.code, this.msg, this.data});
  61. FeedTypeInfo.fromJson(Map<String, dynamic> json) {
  62. try {
  63. result = json['result'];
  64. code = json['code'];
  65. msg = json['msg'];
  66. if (json['data'] != null) {
  67. data = <FeedTypeInfoData>[];
  68. json['data'].forEach((v) {
  69. data!.add(new FeedTypeInfoData.fromJson(v));
  70. });
  71. }
  72. } catch (e, s) {
  73. printErrorStack(e, s);
  74. }
  75. }
  76. Map<String, dynamic> toJson() {
  77. final Map<String, dynamic> data = new Map<String, dynamic>();
  78. data['result'] = this.result;
  79. data['code'] = this.code;
  80. data['msg'] = this.msg;
  81. if (this.data != null) {
  82. data['data'] = this.data!.map((v) => v.toJson()).toList();
  83. }
  84. return data;
  85. }
  86. }
  87. class FeedTypeInfoData {
  88. String? groupId;
  89. String? groupName;
  90. List<Types>? types;
  91. FeedTypeInfoData({this.groupId, this.groupName, this.types});
  92. FeedTypeInfoData.fromJson(Map<String, dynamic> json) {
  93. groupId = json['groupId'];
  94. groupName = json['groupName'];
  95. if (json['types'] != null) {
  96. types = <Types>[];
  97. json['types'].forEach((v) {
  98. types!.add(new Types.fromJson(v));
  99. });
  100. }
  101. }
  102. Map<String, dynamic> toJson() {
  103. final Map<String, dynamic> data = new Map<String, dynamic>();
  104. data['groupId'] = this.groupId;
  105. data['groupName'] = this.groupName;
  106. if (this.types != null) {
  107. data['types'] = this.types!.map((v) => v.toJson()).toList();
  108. }
  109. return data;
  110. }
  111. }
  112. class Types {
  113. String? typeId;
  114. String? typeName;
  115. Types({this.typeId, this.typeName});
  116. Types.fromJson(Map<String, dynamic> json) {
  117. typeId = json['typeId'];
  118. typeName = json['typeName'];
  119. }
  120. Map<String, dynamic> toJson() {
  121. final Map<String, dynamic> data = new Map<String, dynamic>();
  122. data['typeId'] = this.typeId;
  123. data['typeName'] = this.typeName;
  124. return data;
  125. }
  126. }