52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// 设备时段码
|
|
/// </summary>
|
|
[SugarTable(TableName = "DeviceTimePeriod", TableDescription = "设备时段码")]
|
|
public class DeviceTimePeriodEntity : SugarBaseEntity, ITenantId
|
|
{
|
|
/// <summary>
|
|
/// 卡类型
|
|
/// </summary>
|
|
[AdaptIgnore(MemberSide.Destination)]
|
|
[SugarColumn(IsNullable = false, ColumnDescription = "卡类型",
|
|
UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })]
|
|
public int CardType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 分配类型
|
|
/// </summary>
|
|
[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; }
|
|
|
|
/// <summary>
|
|
/// 分配值
|
|
/// </summary>
|
|
[AdaptIgnore(MemberSide.Destination)]
|
|
[SugarColumn(IsNullable = false, ColumnDescription = "分配值",
|
|
UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })]
|
|
public Guid Value { get; set; }
|
|
|
|
/// <summary>
|
|
/// 时段信息
|
|
/// </summary>
|
|
[SugarColumn(IsJson = true, ColumnDataType = "varchar(1000)")]
|
|
public List<DeviceWeekDayTimePeriod> Sections { get; set; }
|
|
|
|
|
|
[SugarColumn(IsNullable = false, UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })]
|
|
public string TenantId { get; set; }
|
|
} |