Chat Updates & Counter Event Modifications
parent
2d8ee5a8eb
commit
2e88275285
@ -1,117 +1,133 @@
|
|||||||
class IncomingCallData {
|
// To parse this JSON data, do
|
||||||
String? callerID;
|
//
|
||||||
String? receiverID;
|
// final callDataModel = callDataModelFromJson(jsonString);
|
||||||
String? msgID;
|
|
||||||
String? notfID;
|
import 'dart:convert';
|
||||||
|
|
||||||
|
class CallDataModel {
|
||||||
|
CallDataModel({
|
||||||
|
this.callerId,
|
||||||
|
this.callReciverId,
|
||||||
|
this.notificationForeground,
|
||||||
|
this.message,
|
||||||
|
this.title,
|
||||||
|
this.type,
|
||||||
|
this.identity,
|
||||||
|
this.name,
|
||||||
|
this.isCall,
|
||||||
|
this.isWebrtc,
|
||||||
|
this.contant,
|
||||||
|
this.contantNo,
|
||||||
|
this.chatEventId,
|
||||||
|
this.fileTypeId,
|
||||||
|
this.currentUserId,
|
||||||
|
this.chatSource,
|
||||||
|
this.userChatHistoryLineRequestList,
|
||||||
|
this.server,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? callerId;
|
||||||
|
String? callReciverId;
|
||||||
String? notificationForeground;
|
String? notificationForeground;
|
||||||
String? count;
|
|
||||||
String? message;
|
String? message;
|
||||||
String? appointmentNo;
|
|
||||||
String? title;
|
String? title;
|
||||||
String? projectID;
|
|
||||||
String? notificationType;
|
|
||||||
String? background;
|
|
||||||
String? doctorname;
|
|
||||||
String? clinicname;
|
|
||||||
String? speciality;
|
|
||||||
String? appointmentdate;
|
|
||||||
String? appointmenttime;
|
|
||||||
String? type;
|
String? type;
|
||||||
String? sessionId;
|
|
||||||
String? identity;
|
String? identity;
|
||||||
String? name;
|
String? name;
|
||||||
String? videoUrl;
|
|
||||||
String? picture;
|
|
||||||
String? token;
|
|
||||||
String? isCall;
|
String? isCall;
|
||||||
String? sound;
|
String? isWebrtc;
|
||||||
|
String? contant;
|
||||||
|
String? contantNo;
|
||||||
|
String? chatEventId;
|
||||||
|
dynamic? fileTypeId;
|
||||||
|
String? currentUserId;
|
||||||
|
String? chatSource;
|
||||||
|
List<UserChatHistoryLineRequestList>? userChatHistoryLineRequestList;
|
||||||
String? server;
|
String? server;
|
||||||
String? isWebRTC;
|
|
||||||
|
|
||||||
IncomingCallData(
|
factory CallDataModel.fromRawJson(String str) => CallDataModel.fromJson(json.decode(str));
|
||||||
{this.msgID,
|
|
||||||
this.notfID,
|
String toRawJson() => json.encode(toJson());
|
||||||
this.notificationForeground,
|
|
||||||
this.count,
|
factory CallDataModel.fromJson(Map<String, dynamic> json) => CallDataModel(
|
||||||
this.message,
|
callerId: json["callerID"] == null ? null : json["callerID"],
|
||||||
this.appointmentNo,
|
callReciverId: json["callReciverID"] == null ? null : json["callReciverID"],
|
||||||
this.title,
|
notificationForeground: json["notification_foreground"] == null ? null : json["notification_foreground"],
|
||||||
this.projectID,
|
message: json["message"] == null ? null : json["message"],
|
||||||
this.notificationType,
|
title: json["title"] == null ? null : json["title"],
|
||||||
this.background,
|
type: json["type"] == null ? null : json["type"],
|
||||||
this.doctorname,
|
identity: json["identity"] == null ? null : json["identity"],
|
||||||
this.clinicname,
|
name: json["name"] == null ? null : json["name"],
|
||||||
this.speciality,
|
isCall: json["is_call"] == null ? null : json["is_call"],
|
||||||
this.appointmentdate,
|
isWebrtc: json["is_webrtc"] == null ? null : json["is_webrtc"],
|
||||||
this.appointmenttime,
|
contant: json["contant"] == null ? null : json["contant"],
|
||||||
this.type,
|
contantNo: json["contantNo"] == null ? null : json["contantNo"],
|
||||||
this.sessionId,
|
chatEventId: json["chatEventId"] == null ? null : json["chatEventId"],
|
||||||
this.identity,
|
fileTypeId: json["fileTypeId"],
|
||||||
this.name,
|
currentUserId: json["currentUserId"] == null ? null : json["currentUserId"],
|
||||||
this.videoUrl,
|
chatSource: json["chatSource"] == null ? null : json["chatSource"],
|
||||||
this.picture,
|
userChatHistoryLineRequestList: json["userChatHistoryLineRequestList"] == null
|
||||||
this.isCall,
|
? null
|
||||||
this.sound});
|
: List<UserChatHistoryLineRequestList>.from(
|
||||||
|
json["userChatHistoryLineRequestList"].map(
|
||||||
|
(x) => UserChatHistoryLineRequestList.fromJson(x),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
server: json["server"] == null ? null : json["server"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"callerID": callerId == null ? null : callerId,
|
||||||
|
"callReciverID": callReciverId == null ? null : callReciverId,
|
||||||
|
"notification_foreground": notificationForeground == null ? null : notificationForeground,
|
||||||
|
"message": message == null ? null : message,
|
||||||
|
"title": title == null ? null : title,
|
||||||
|
"type": type == null ? null : type,
|
||||||
|
"identity": identity == null ? null : identity,
|
||||||
|
"name": name == null ? null : name,
|
||||||
|
"is_call": isCall == null ? null : isCall,
|
||||||
|
"is_webrtc": isWebrtc == null ? null : isWebrtc,
|
||||||
|
"contant": contant == null ? null : contant,
|
||||||
|
"contantNo": contantNo == null ? null : contantNo,
|
||||||
|
"chatEventId": chatEventId == null ? null : chatEventId,
|
||||||
|
"fileTypeId": fileTypeId,
|
||||||
|
"currentUserId": currentUserId == null ? null : currentUserId,
|
||||||
|
"chatSource": chatSource == null ? null : chatSource,
|
||||||
|
"userChatHistoryLineRequestList": userChatHistoryLineRequestList == null
|
||||||
|
? null
|
||||||
|
: List<dynamic>.from(
|
||||||
|
userChatHistoryLineRequestList!.map(
|
||||||
|
(x) => x.toJson(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
"server": server == null ? null : server,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserChatHistoryLineRequestList {
|
||||||
|
UserChatHistoryLineRequestList({
|
||||||
|
this.isSeen,
|
||||||
|
this.isDelivered,
|
||||||
|
this.targetUserId,
|
||||||
|
this.targetUserStatus,
|
||||||
|
});
|
||||||
|
|
||||||
|
bool? isSeen;
|
||||||
|
bool? isDelivered;
|
||||||
|
int? targetUserId;
|
||||||
|
int? targetUserStatus;
|
||||||
|
|
||||||
IncomingCallData.fromJson(Map<String, dynamic> json) {
|
factory UserChatHistoryLineRequestList.fromJson(Map<String, dynamic> json) => UserChatHistoryLineRequestList(
|
||||||
callerID = json['callerID'];
|
isSeen: json["isSeen"] == null ? null : json["isSeen"],
|
||||||
receiverID = json['PatientID'];
|
isDelivered: json["isDelivered"] == null ? null : json["isDelivered"],
|
||||||
msgID = json['msgID'];
|
targetUserId: json["targetUserId"] == null ? null : json["targetUserId"],
|
||||||
notfID = json['notfID'];
|
targetUserStatus: json["targetUserStatus"] == null ? null : json["targetUserStatus"],
|
||||||
notificationForeground = json['notification_foreground'];
|
);
|
||||||
count = json['count'];
|
|
||||||
message = json['message'];
|
|
||||||
appointmentNo = json['AppointmentNo'];
|
|
||||||
title = json['title'];
|
|
||||||
projectID = json['ProjectID'];
|
|
||||||
notificationType = json['NotificationType'];
|
|
||||||
background = json['background'];
|
|
||||||
doctorname = json['doctorname'];
|
|
||||||
clinicname = json['clinicname'];
|
|
||||||
speciality = json['speciality'];
|
|
||||||
appointmentdate = json['appointmentdate'];
|
|
||||||
appointmenttime = json['appointmenttime'];
|
|
||||||
type = json['type'];
|
|
||||||
sessionId = json['session_id'];
|
|
||||||
token = json['token'];
|
|
||||||
identity = json['identity'];
|
|
||||||
name = json['name'];
|
|
||||||
videoUrl = json['videoUrl'];
|
|
||||||
picture = json['picture'];
|
|
||||||
isCall = json['is_call'];
|
|
||||||
sound = json['sound'];
|
|
||||||
server = json['server'];
|
|
||||||
isWebRTC = json['is_webrtc'] ?? "true";
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() => {
|
||||||
Map<String, dynamic> data = Map<String, dynamic>();
|
"isSeen": isSeen == null ? null : isSeen,
|
||||||
data['msgID'] = this.msgID;
|
"isDelivered": isDelivered == null ? null : isDelivered,
|
||||||
data['notfID'] = this.notfID;
|
"targetUserId": targetUserId == null ? null : targetUserId,
|
||||||
data['notification_foreground'] = this.notificationForeground;
|
"targetUserStatus": targetUserStatus == null ? null : targetUserStatus,
|
||||||
data['count'] = this.count;
|
};
|
||||||
data['message'] = this.message;
|
|
||||||
data['AppointmentNo'] = this.appointmentNo;
|
|
||||||
data['title'] = this.title;
|
|
||||||
data['ProjectID'] = this.projectID;
|
|
||||||
data['NotificationType'] = this.notificationType;
|
|
||||||
data['background'] = this.background;
|
|
||||||
data['doctorname'] = this.doctorname;
|
|
||||||
data['clinicname'] = this.clinicname;
|
|
||||||
data['speciality'] = this.speciality;
|
|
||||||
data['appointmentdate'] = this.appointmentdate;
|
|
||||||
data['appointmenttime'] = this.appointmenttime;
|
|
||||||
data['type'] = this.type;
|
|
||||||
data['session_id'] = this.sessionId;
|
|
||||||
data['token'] = this.token;
|
|
||||||
data['identity'] = this.identity;
|
|
||||||
data['name'] = this.name;
|
|
||||||
data['videoUrl'] = this.videoUrl;
|
|
||||||
data['picture'] = this.picture;
|
|
||||||
data['is_call'] = this.isCall;
|
|
||||||
data['sound'] = this.sound;
|
|
||||||
data['server'] = this.server;
|
|
||||||
data['is_webrtc'] = this.isWebRTC;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue