using Dlhis.Entity.Device.Enums; using Kurisu.AspNetCore.DataAccess.Entity; using Kurisu.AspNetCore.DataAccess.SqlSugar; using SqlSugar; using SqlSugar.DbConvert; namespace Dlhis.Entity.Device.Entities; /// /// 设备任务表 /// [SugarTable(TableName = "DeviceTask")] public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion { /// /// 任务类型 /// [SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Type" })] public DeviceTaskEnumType Type { get; set; } /// /// 设备类型 /// [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))] public DeviceTypeEnumType? DeviceType { get; set; } /// /// 用户id /// [SugarColumn(IsNullable = true)] public long? UserId { get; set; } /// /// 用户档案号 /// [SugarColumn(IsNullable = true)] public string UserNo { get; set; } /// /// 设备唯一号 /// [SugarColumn(IsNullable = false, IndexGroupNameList = new[] { "idx_DeviceTask_DeviceUniqueNo" })] public string DeviceUniqueNo { get; set; } /// /// 任务下发状态 /// [SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })] public DeviceTaskStatusEnumType Status { get; set; } /// /// 数据版本 /// [SugarColumn(IsNullable = false)] public int Version { get; set; } /// /// 处理结果 /// [SugarColumn(IsNullable = true, ColumnDataType = "longtext")] public string ResultMessage { get; set; } /// /// 任务来源 /// [SugarColumn(IsNullable = true, ColumnDataType = "varchar(255)")] public string Source { get; set; } /// /// 优先级 /// [SugarColumn(IsNullable = false, DefaultValue = "0")] public int Priority { get; set; } = 0; public string TenantId { get; set; } }