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.

70 lines
1.8KB

  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. NotificationDTO({
  14. this.id,
  15. this.subject,
  16. this.message,
  17. this.tbCropId,
  18. this.tbEntityId,
  19. this.externalId,
  20. this.contents,
  21. this.createdDate,
  22. this.sendDate,
  23. this.type,
  24. this.isRead,
  25. });
  26. NotificationDTO.clone(NotificationDTO noti) {
  27. this.id = noti.id;
  28. this.contents = noti.contents;
  29. this.tbCropId = noti.tbCropId;
  30. this.tbEntityId = noti.tbEntityId;
  31. this.externalId = noti.externalId;
  32. this.subject = noti.subject;
  33. this.message = noti.message;
  34. this.createdDate = noti.createdDate;
  35. this.sendDate = noti.sendDate;
  36. this.type = noti.type;
  37. this.isRead = noti.isRead;
  38. }
  39. NotificationDTO.fromJson(Map<String, dynamic> json) {
  40. id = json['id'];
  41. subject = json['subject'];
  42. message = json['message'];
  43. tbCropId = json['tbCropId'];
  44. tbEntityId = json['tbEntityId'];
  45. externalId = json['externalId'];
  46. contents = json['contents'];
  47. createdDate = json['createdDate'];
  48. sendDate = json['sendDate'];
  49. type = json['type'];
  50. isRead = json['isRead'];
  51. }
  52. Map<String, dynamic> toJson() {
  53. final Map<String, dynamic> data = new Map<String, dynamic>();
  54. data['id'] = this.id;
  55. data['subject'] = this.subject;
  56. data['message'] = this.message;
  57. data['tbCropId'] = this.tbCropId;
  58. data['tbEntityId'] = this.tbEntityId;
  59. data['externalId'] = this.externalId;
  60. data['contents'] = this.contents;
  61. data['createdDate'] = this.createdDate;
  62. data['sendDate'] = this.sendDate;
  63. data['type'] = this.type;
  64. data['isRead'] = this.isRead;
  65. return data;
  66. }
  67. }