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.

38 lines
1.2KB

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