You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.2KB

  1. class NotificationDTO {
  2. int? id;
  3. String? subject;
  4. String? message;
  5. int? tbCropId;
  6. int? tbEntityId;
  7. int? externalId;
  8. String? contents;
  9. String? createdDate;
  10. String? sendDate;
  11. int? isRead;
  12. String? type;
  13. String? activityTypeName;
  14. int? activityTypeId;
  15. NotificationDTO({
  16. this.id,
  17. this.subject,
  18. this.message,
  19. this.tbCropId,
  20. this.tbEntityId,
  21. this.externalId,
  22. this.contents,
  23. this.createdDate,
  24. this.sendDate,
  25. this.type,
  26. this.isRead,
  27. this.activityTypeName,
  28. this.activityTypeId,
  29. });
  30. NotificationDTO.clone(NotificationDTO noti) {
  31. this.id = noti.id;
  32. this.contents = noti.contents;
  33. this.tbCropId = noti.tbCropId;
  34. this.tbEntityId = noti.tbEntityId;
  35. this.externalId = noti.externalId;
  36. this.subject = noti.subject;
  37. this.message = noti.message;
  38. this.createdDate = noti.createdDate;
  39. this.sendDate = noti.sendDate;
  40. this.type = noti.type;
  41. this.isRead = noti.isRead;
  42. this.activityTypeName = noti.activityTypeName;
  43. this.activityTypeId = noti.activityTypeId;
  44. }
  45. NotificationDTO.fromJson(Map<String, dynamic> json) {
  46. id = json['id'];
  47. subject = json['subject'];
  48. message = json['message'];
  49. tbCropId = json['tbCropId'];
  50. tbEntityId = json['tbEntityId'];
  51. externalId = json['externalId'];
  52. contents = json['contents'];
  53. createdDate = json['createdDate'];
  54. sendDate = json['sendDate'];
  55. type = json['type'];
  56. isRead = json['isRead'];
  57. activityTypeName = json['activityTypeName'];
  58. activityTypeId = json['activityTypeId'];
  59. }
  60. Map<String, dynamic> toJson() {
  61. final Map<String, dynamic> data = new Map<String, dynamic>();
  62. data['id'] = this.id;
  63. data['subject'] = this.subject;
  64. data['message'] = this.message;
  65. data['tbCropId'] = this.tbCropId;
  66. data['tbEntityId'] = this.tbEntityId;
  67. data['externalId'] = this.externalId;
  68. data['contents'] = this.contents;
  69. data['createdDate'] = this.createdDate;
  70. data['sendDate'] = this.sendDate;
  71. data['type'] = this.type;
  72. data['isRead'] = this.isRead;
  73. data['activityTypeName'] = this.activityTypeName;
  74. data['activityTypeId'] = this.activityTypeId;
  75. return data;
  76. }
  77. }