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.

59 lines
1.5KB

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