|
- import 'NotificationDTO.dart';
-
- class NotificationObjectDTO {
- int numberUnreadPage;
- int numberReadPage;
- int numberUnreadTotal;
- int numberReadTotal;
- List<NotificationDTO> notificationDTO;
-
- NotificationObjectDTO(
- {this.numberUnreadPage,
- this.numberReadPage,
- this.numberUnreadTotal,
- this.numberReadTotal,
- this.notificationDTO});
-
- NotificationObjectDTO.fromJson(Map<String, dynamic> json) {
- numberUnreadPage = json['numberUnreadPage'];
- numberReadPage = json['numberReadPage'];
- numberUnreadTotal = json['numberUnreadTotal'];
- numberReadTotal = json['numberReadTotal'];
- if (json['tbnotificationDTOs'] != null) {
- notificationDTO = new List<NotificationDTO>();
- json['tbnotificationDTOs'].forEach((v) {
- notificationDTO.add(new NotificationDTO.fromJson(v));
- });
- }
- }
-
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['numberUnreadPage'] = this.numberUnreadPage;
- data['numberReadPage'] = this.numberReadPage;
- data['numberUnreadTotal'] = this.numberUnreadTotal;
- data['numberReadTotal'] = this.numberReadTotal;
- if (this.notificationDTO != null) {
- data['tbnotificationDTOs'] =
- this.notificationDTO.map((v) => v.toJson()).toList();
- }
- return data;
- }
- }
|