notifications api added.
parent
258fb2c333
commit
2c9f2dce08
@ -1,26 +0,0 @@
|
|||||||
import 'package:test_sa/views/pages/user/requests/future_request_service_details.dart';
|
|
||||||
|
|
||||||
class AppNotification {
|
|
||||||
String requestId;
|
|
||||||
String title;
|
|
||||||
String description;
|
|
||||||
String date;
|
|
||||||
String path;
|
|
||||||
|
|
||||||
AppNotification({
|
|
||||||
this.requestId,
|
|
||||||
this.title,
|
|
||||||
this.description,
|
|
||||||
this.date,
|
|
||||||
this.path,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory AppNotification.fromJson(Map<String, dynamic> parsedJson) {
|
|
||||||
return AppNotification(
|
|
||||||
requestId: parsedJson["nid"],
|
|
||||||
title: parsedJson["call_client"] ?? parsedJson["title"],
|
|
||||||
description: parsedJson["task_description"],
|
|
||||||
date: parsedJson["creation_date"],
|
|
||||||
path: FutureRequestServiceDetails.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
import 'package:test_sa/views/pages/user/requests/future_request_service_details.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> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue