using Dlhis.Entity.Device.Enums;
using Kurisu.Core.DataAccess.Entity;
using Kurisu.SqlSugar;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Device.Entities;
///
/// 设备任务表
///
[SugarTable(TableName = "DeviceTask")]
public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
{
///
/// 任务类型
///
[SugarColumn(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; }
///
/// 用户档案号
///
public string UserNo { get; set; }
///
/// 设备唯一号
///
[SugarColumn(IsNullable = false, IndexGroupNameList = new[] { "idx_DeviceTask_DeviceUniqueNo" })]
public string DeviceUniqueNo { get; set; }
///
/// 任务下发状态
///
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })]
public DeviceTaskStatusEnumType Status { get; set; }
///
/// 数据版本
///
public int Version { get; set; }
///
/// 处理结果
///
[SugarColumn(ColumnDataType = "longtext")]
public string ResultMessage { get; set; }
///
/// 取消id
///
[SugarColumn(DefaultValue = "0")]
public long CancellationId { get; set; } = 0;
///
/// 优先级
///
[SugarColumn(IsNullable = true, DefaultValue = "0")]
public int Priority { get; set; } = 0;
public string TenantId { get; set; }
}