using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Assets.MyGame.Scripts.Net.APIResponses.Customer_SubClass { /// /// 会话信息 /// [Serializable] public class ConversationInfo { /// /// 会话ID /// public string id; /// /// 用户ID /// public string userId; /// /// 用户昵称 /// public string userName; /// /// 客服ID /// public string customerId; /// /// 客服昵称 /// public string customerName; /// /// 会话状态 /// public int status; /// /// 创建时间 /// public string createTime; } /// /// 消息信息 /// [Serializable] public class CustomerMessageInfo { /// /// 会话ID /// public string conversationId; /// /// 发送者类型(1:用户 2:客服) /// public int senderType; /// /// 发送者ID /// public string senderId; /// /// 发送者昵称 /// public string senderName; /// /// 发送者头像 /// public string senderAvatar; /// /// 内容类型(1:文字 2:图片) /// public int contentType; /// /// 消息内容 /// public string content; /// /// 创建时间 /// public string createTime; } /// /// 在线客服信息 /// [Serializable] public class CustomerOnlineInfo { /// /// 客服用户ID /// public string userId; /// /// 客服名称 /// public string userName; /// /// 客服头像 /// public string avatar; /// /// 状态(0:离线 1:在线) /// public int status; } /// /// 发起会话结果(WebSocket 回调) /// [Serializable] public class StartConversationResult { /// /// 是否成功 /// public bool isOk; /// /// 提示信息 /// public string msg; /// /// 会话信息 /// public ConversationInfo conversation; } /// /// 新会话通知(WebSocket 回调,客服端) /// [Serializable] public class NewConversationNotice { /// /// 会话ID /// public string conversationId; /// /// 客服ID /// public string customerId; /// /// 客服昵称 /// public string customerName; /// /// 用户ID /// public string userId; /// /// 用户昵称 /// public string userName; /// /// 会话状态 /// public int status; /// /// 创建时间 /// public string createTime; } /// /// 我的会话(含消息列表) /// GET /customerapi/Customer/my-conversations /// [Serializable] public class MyConversationInfo { public string id; public string userId; public string customerId; public int status; public List messages; } }