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.

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