59 lines
1.8 KiB
Dart
59 lines
1.8 KiB
Dart
class FetchNotification {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
Data? data;
|
|
|
|
FetchNotification({this.status, this.statusCode, this.message, this.data});
|
|
|
|
FetchNotification.fromJson(Map<String, dynamic> json) {
|
|
status = json['status'];
|
|
statusCode = json['status_code'];
|
|
message = json['message'];
|
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['status'] = this.status;
|
|
data['status_code'] = this.statusCode;
|
|
data['message'] = this.message;
|
|
if (this.data != null) {
|
|
data['data'] = this.data!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Data {
|
|
int? groupNotification;
|
|
int? communityNotification;
|
|
int? followerNotification;
|
|
int? newFollowerNotification;
|
|
int? directMessageNotification;
|
|
|
|
Data(
|
|
{this.groupNotification,
|
|
this.communityNotification,
|
|
this.followerNotification,
|
|
this.newFollowerNotification,
|
|
this.directMessageNotification});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
groupNotification = json['group_notification'];
|
|
communityNotification = json['community_notification'];
|
|
followerNotification = json['follower_notification'];
|
|
newFollowerNotification = json['new_follower_notification'];
|
|
directMessageNotification = json['direct_message_notification'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['group_notification'] = this.groupNotification;
|
|
data['community_notification'] = this.communityNotification;
|
|
data['follower_notification'] = this.followerNotification;
|
|
data['new_follower_notification'] = this.newFollowerNotification;
|
|
data['direct_message_notification'] = this.directMessageNotification;
|
|
return data;
|
|
}
|
|
} |