notice_model.dart 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. class Autogenerated {
  2. List<Records> records;
  3. Autogenerated({this.records});
  4. Autogenerated.fromJson(Map<String, dynamic> json) {
  5. if (json['records'] != null) {
  6. records = new List<Records>();
  7. json['records'].forEach((v) {
  8. records.add(new Records.fromJson(v));
  9. });
  10. }
  11. }
  12. Map<String, dynamic> toJson() {
  13. final Map<String, dynamic> data = new Map<String, dynamic>();
  14. if (this.records != null) {
  15. data['records'] = this.records.map((v) => v.toJson()).toList();
  16. }
  17. return data;
  18. }
  19. }
  20. class Records {
  21. String id;
  22. String userId;
  23. String content;
  24. int type;
  25. int viewFlag;
  26. int deviceModel;
  27. String createUserId;
  28. String createTime;
  29. Records(
  30. {this.id,
  31. this.userId,
  32. this.content,
  33. this.type,
  34. this.viewFlag,
  35. this.deviceModel,
  36. this.createUserId,
  37. this.createTime});
  38. Records.fromJson(Map<String, dynamic> json) {
  39. id = json['id'];
  40. userId = json['userId'];
  41. content = json['content'];
  42. type = json['type'];
  43. viewFlag = json['viewFlag'];
  44. deviceModel = json['deviceModel'];
  45. createUserId = json['createUserId'];
  46. createTime = json['createTime'];
  47. }
  48. Map<String, dynamic> toJson() {
  49. final Map<String, dynamic> data = new Map<String, dynamic>();
  50. data['id'] = this.id;
  51. data['userId'] = this.userId;
  52. data['content'] = this.content;
  53. data['type'] = this.type;
  54. data['viewFlag'] = this.viewFlag;
  55. data['deviceModel'] = this.deviceModel;
  56. data['createUserId'] = this.createUserId;
  57. data['createTime'] = this.createTime;
  58. return data;
  59. }
  60. }