toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['agentName'] = agentName;
data['email'] = email;
data['businessId'] = businessId;
data['customer'] = customer;
data['phoneNo'] = phoneNo;
if (message != null) {
data['message'] = message?.toJson();
}
data['escalated'] = escalated;
data['sentiment'] = sentiment;
data['channel'] = channel;
data['category'] = category;
data['type'] = type;
data['department'] = department;
data['escalation_department'] = escalationDepartment;
// if (titles != null) {
// data['titles'] = titles!.map((v) => v.toJson()).toList();
// }
data['isCompleted'] = isCompleted;
data['created_date'] = createdDate;
data['createdAt'] = createdAt?.toIso8601String();
data['updatedAt'] = updatedAt?.toIso8601String();
data['update_date'] = updateDate;
data['id'] = id;
data['title'] = title;
return data;
}