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.

43 lines
1.3KB

  1. import 'NotificationDTO.dart';
  2. class NotificationObjectDTO {
  3. int numberUnreadPage;
  4. int numberReadPage;
  5. int numberUnreadTotal;
  6. int numberReadTotal;
  7. List<NotificationDTO> notificationDTO;
  8. NotificationObjectDTO(
  9. {this.numberUnreadPage,
  10. this.numberReadPage,
  11. this.numberUnreadTotal,
  12. this.numberReadTotal,
  13. this.notificationDTO});
  14. NotificationObjectDTO.fromJson(Map<String, dynamic> json) {
  15. numberUnreadPage = json['numberUnreadPage'];
  16. numberReadPage = json['numberReadPage'];
  17. numberUnreadTotal = json['numberUnreadTotal'];
  18. numberReadTotal = json['numberReadTotal'];
  19. if (json['tbnotificationDTOs'] != null) {
  20. notificationDTO = new List<NotificationDTO>();
  21. json['tbnotificationDTOs'].forEach((v) {
  22. notificationDTO.add(new NotificationDTO.fromJson(v));
  23. });
  24. }
  25. }
  26. Map<String, dynamic> toJson() {
  27. final Map<String, dynamic> data = new Map<String, dynamic>();
  28. data['numberUnreadPage'] = this.numberUnreadPage;
  29. data['numberReadPage'] = this.numberReadPage;
  30. data['numberUnreadTotal'] = this.numberUnreadTotal;
  31. data['numberReadTotal'] = this.numberReadTotal;
  32. if (this.notificationDTO != null) {
  33. data['tbnotificationDTOs'] =
  34. this.notificationDTO.map((v) => v.toJson()).toList();
  35. }
  36. return data;
  37. }
  38. }