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.

65 lines
1.6KB

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