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.

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