using Dlhis.DataPermission.Model;
using Dlhis.Entity.Basic.Enums;
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 = "DeviceUploadLog", TableDescription = "设备上传记录")]
public class DeviceUploadLogEntity : SugarBaseEntity, ITenantId
{
[SugarColumn(IsNullable = false)]
public string SerialNo { get; set; } = string.Empty;
///
/// 设备code
///
[DeviceCode]
[SugarColumn(IsNullable = false)]
public Guid DeviceCode { get; set; }
///
/// 设备号
///
[SugarColumn(IsNullable = false)]
public string DeviceUniqueNo { get; set; }
///
/// 人员唯一号
///
[SugarColumn(IsNullable = true)]
public string UserUniqueNo { get; set; }
///
/// 人员类型
///
[SugarColumn(IsNullable = true, ColumnDescription = "人员类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public GainfoUserTypeEnumType? UserType { get; set; }
///
/// 产生时间
///
[SugarColumn(IsNullable = false)]
public DateTime RaiseDateTime { get; set; }
///
/// 记录类型
///
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public DeviceUploadLogTypeEnumType Type { get; set; }
///
/// 是否要上传
///
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
public bool NeedUpload { get; set; }
///
/// 同步数据
///
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
public bool Sync { get; set; }
///
/// 是否有效
///
[SugarColumn(IsNullable = false, ColumnDataType = "bit")]
public bool Status { get; set; }
///
/// 图片base64 / URL
///
[SugarColumn(IsNullable = true, ColumnDataType = "text")]
public string Image { get; set; }
///
/// 网格信息
///
[SugarColumn(IsNullable = true, ColumnDataType = "text")]
public string WorkGridInfo { get; set; }
[SugarColumn(IndexGroupNameList = new[] { "idx_DeviceUploadLog_TenantId" })]
public string TenantId { get; set; }
}