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. });
  15. NotificationObjectDTO.fromJson(Map<String, dynamic> json) {
  16. numberUnreadPage = json['numberUnreadPage'];
  17. numberReadPage = json['numberReadPage'];
  18. numberUnreadTotal = json['numberUnreadTotal'];
  19. numberReadTotal = json['numberReadTotal'];
  20. if (json['tbnotificationDTOs'] != null) {
  21. notificationDTO = <NotificationDTO>[];
  22. json['tbnotificationDTOs'].forEach((v) {
  23. notificationDTO?.add(new NotificationDTO.fromJson(v));
  24. });
  25. }
  26. }
  27. Map<String, dynamic> toJson() {
  28. final Map<String, dynamic> data = new Map<String, dynamic>();
  29. data['numberUnreadPage'] = this.numberUnreadPage;
  30. data['numberReadPage'] = this.numberReadPage;
  31. data['numberUnreadTotal'] = this.numberUnreadTotal;
  32. data['numberReadTotal'] = this.numberReadTotal;
  33. if (this.notificationDTO != null) {
  34. data['tbnotificationDTOs'] = this.notificationDTO?.map((v) => v.toJson()).toList();
  35. }
  36. return data;
  37. }
  38. }