using Dlhis.Entity.Device.Enums; using Dlhis.Entity.Device.Models; using Kurisu.AspNetCore.DataAccess.Entity; using Kurisu.AspNetCore.DataAccess.SqlSugar; using Mapster; using SqlSugar; using SqlSugar.DbConvert; namespace Dlhis.Entity.Device.Entities; /// /// 设备时段码 /// [SugarTable(TableName = "DeviceTimePeriod", TableDescription = "设备时段码")] public class DeviceTimePeriodEntity : SugarBaseEntity, ITenantId { /// /// 卡类型 /// [AdaptIgnore(MemberSide.Destination)] [SugarColumn(IsNullable = false, ColumnDescription = "卡类型", UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })] public int CardType { get; set; } /// /// 分配类型 /// [AdaptIgnore(MemberSide.Destination)] [SugarColumn(IsNullable = false, ColumnDescription = "分配类型", ColumnDataType = "varchar(50)", UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" }, SqlParameterDbType = typeof(EnumToStringConvert))] public DeviceTimePeriodAssignEnumType AssignType { get; set; } /// /// 分配值 /// [AdaptIgnore(MemberSide.Destination)] [SugarColumn(IsNullable = false, ColumnDescription = "分配值", UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })] public Guid Value { get; set; } /// /// 时段信息 /// [SugarColumn(IsJson = true, ColumnDataType = "varchar(1000)")] public List Sections { get; set; } [SugarColumn(IsNullable = false, UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })] public string TenantId { get; set; } }