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