You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/models/system_notification_model.dart

69 lines
2.0 KiB
Dart

class SystemNotificationModel {
String userId;
String userName;
String title;
String text;
int referenceId;
int sourceId;
String sourceName;
bool readed;
String readingDate;
int id;
String createdOn;
String modifiedOn;
SystemNotificationModel(
{this.userId, this.userName, this.title, this.text, this.referenceId, this.sourceId, this.sourceName, this.readed, this.readingDate, this.id, this.createdOn, this.modifiedOn});
SystemNotificationModel.fromJson(Map<String, dynamic> json) {
userId = json['userId'];
userName = json['userName'];
title = json['title'];
text = json['text'];
referenceId = json['referenceId'];
sourceId = json['sourceId'];
sourceName = json['sourceName'];
readed = json['readed'];
readingDate = json['readingDate'];
id = json['id'];
createdOn = json['createdOn'];
modifiedOn = json['modifiedOn'];
}
Map<String, dynamic> toNotificationJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['userId'] = this.userId;
data['userName'] = this.userName;
data['title'] = this.title;
data['text'] = this.text;
data['requestNumber'] = this.referenceId;
data['sourceId'] = this.sourceId;
data['requestType'] = this.sourceName;
data['readed'] = this.readed;
data['readingDate'] = this.readingDate;
data['id'] = this.id;
data['createdOn'] = this.createdOn;
data['modifiedOn'] = this.modifiedOn;
data['priority'] = "Low Priority";
return data;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['userId'] = this.userId;
data['userName'] = this.userName;
data['title'] = this.title;
data['text'] = this.text;
data['referenceId'] = this.referenceId;
data['sourceId'] = this.sourceId;
data['sourceName'] = this.sourceName;
data['readed'] = this.readed;
data['readingDate'] = this.readingDate;
data['id'] = this.id;
data['createdOn'] = this.createdOn;
data['modifiedOn'] = this.modifiedOn;
return data;
}
}