using IM_API.Tools;
namespace IM_API.Dtos
{
public class SignalRResponseDto
{
public string Type { get; set; }
public string Message { get; set; }
public int Code { get; set; }
public string Status { get; set; }
public SignalRResponseDto(SignalRResponseType type,CodeDefine codeDefine)
{
this.Type = type.ToString();
this.Code = codeDefine.Code;
this.Message = codeDefine.Message;
this.Status = codeDefine.Message;
}
public SignalRResponseDto(SignalRResponseType type)
{
this.Type = type.ToString();
this.Code = CodeDefine.SUCCESS.Code;
this.Message = CodeDefine.SUCCESS.Message;
this.Status = CodeDefine.SUCCESS.Message;
}
}
public enum SignalRResponseType
{
///
/// 消息
///
MESSAGE = 0,
///
/// 鉴权
///
AUTH = 1,
///
/// 心跳
///
HEARTBEAT = 2,
///
/// 消息回执
///
MESSAGE_ACK = 3,
///
/// 消息撤回
///
MESSAGE_RECALL = 4,
///
/// 好友请求
///
FRIEND_REQUEST = 5,
///
/// 群邀请
///
GROUP_INVITE = 6,
///
/// 系统通知
///
SYSTEM_NOTICE = 7,
///
/// 错误
///
ERROR = 8
}
}