notification_list_entity.dart 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. class NotificationListEntity {
  2. int total;
  3. List<NotificationListItem> rows;
  4. NotificationListEntity.fromJsonMap(Map<String, dynamic> map):
  5. total = map["total"],
  6. rows = List<NotificationListItem>.from(map["rows"].map((it) => NotificationListItem.fromJsonMap(it)));
  7. Map<String, dynamic> toJson() {
  8. final Map<String, dynamic> data = new Map<String, dynamic>();
  9. data['total'] = total;
  10. data['rows'] = rows != null ?
  11. this.rows.map((v) => v.toJson()).toList()
  12. : null;
  13. return data;
  14. }
  15. }
  16. class NotificationListItem {
  17. String id;
  18. String name;
  19. String corporator;
  20. String telephone;
  21. String remarks;
  22. int isCertificated;
  23. String logoImg;
  24. int userNum;
  25. String createDate;
  26. bool currentTeamFlag;
  27. NotificationListItem.fromJsonMap(Map<String, dynamic> map):
  28. id = map["id"]??"",
  29. name = map["name"]??"",
  30. corporator = map["corporator"]??"",
  31. telephone = map["telephone"]??"",
  32. remarks = map["remarks"]??"无",
  33. isCertificated = map["isCertificated"]??0,
  34. logoImg = map["logoImg"]??"",
  35. userNum = map["userNum"]??0,
  36. createDate = map["createDate"]??"",
  37. currentTeamFlag = map["currentTeamFlag"]??false;
  38. Map<String, dynamic> toJson() {
  39. final Map<String, dynamic> data = new Map<String, dynamic>();
  40. data['id'] = id;
  41. data['name'] = name;
  42. data['corporator'] = corporator;
  43. data['telephone'] = telephone;
  44. data['remarks'] = remarks;
  45. data['isCertificated'] = isCertificated;
  46. data['logoImg'] = logoImg;
  47. return data;
  48. }
  49. }