78 lines
2.3 KiB
C#
78 lines
2.3 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// 设备任务表
|
|
/// </summary>
|
|
[SugarTable(TableName = "DeviceTask")]
|
|
public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
|
|
{
|
|
/// <summary>
|
|
/// 任务类型
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Type" })]
|
|
public DeviceTaskEnumType Type { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备类型
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
|
public DeviceTypeEnumType? DeviceType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 用户id
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true)]
|
|
public long? UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 用户档案号
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true)]
|
|
public string UserNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备唯一号
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, IndexGroupNameList = new[] { "idx_DeviceTask_DeviceUniqueNo" })]
|
|
public string DeviceUniqueNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 任务下发状态
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })]
|
|
public DeviceTaskStatusEnumType Status { get; set; }
|
|
|
|
/// <summary>
|
|
/// 数据版本
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false)]
|
|
public int Version { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 处理结果
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true, ColumnDataType = "longtext")]
|
|
public string ResultMessage { get; set; }
|
|
|
|
/// <summary>
|
|
/// 任务来源
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(255)")]
|
|
public string Source { get; set; }
|
|
|
|
/// <summary>
|
|
/// 优先级
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, DefaultValue = "0")]
|
|
public int Priority { get; set; } = 0;
|
|
|
|
|
|
public string TenantId { get; set; }
|
|
} |