namespace IES.ExamServer.Models { public abstract class MessageBody { public MessageBody() { time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); } /// /// 连接id /// public virtual string? connid { get; set; } /// /// 客户端id /// public virtual string? clientid { get; set; } /// ///-1 error(红),0 info(黑、白),1 success(绿),2 warning(黄) /// public int status { get; set; } /// /// 内容 /// public string? content { get; set; } /// /// 批量消息 /// public List contents { get; set; } = new List(); /// /// 消息创建时间 /// public virtual long time { get; set; } /// /// 授权类型,bookjs_api /// public virtual string? grant_type { get; set; } /// /// 类型message 消息,check检查,download下载,upload上传数据 /// public string? type { get; set; } } public class ConnectionMessageBody : MessageBody { } public class DisConnectionMessageBody : MessageBody { } public class DownloadUplodaFileMessageBody : MessageBody { /// /// 文件大小 /// public long size { get; set; } /// /// 消耗时间 /// public long cost { get; set; } } public class CheckFileMessageBody : MessageBody { } public class MessageContent { /// ///-1 error(红),0 info(黑、白),1 success(绿),2 warning(黄) /// public int status { get; set; } /// /// 内容 /// public string? content { get; set; } /// /// 消耗时间 /// public long cost { get; set; } /// /// 消息类型 /// public string? messageType { get; set; } /// /// 批量信息 /// public List contents { get; set; } = new List(); /// /// 数据id /// public string? dataId { get; set; } /// /// 数据名称 /// public string? dataName { get; set; } /// /// 步骤 /// public int step { get; set; } public int filish { get; set; } } public class SignalRClient { /// /// 授权类型,bookjs_api /// public string? grant_type { get; set; } /// /// 客户端id /// public string? clientid { get; set; } /// /// SignalR的连接ID 不建议暴露。 /// public string? connid { get; set; } public string? serverid { get; set; } } }