feat 时段码增删改查
This commit is contained in:
@@ -95,6 +95,13 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
[SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否作为考勤设备")]
|
||||
public bool AsAttendance { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用时段码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否启用时段码", DefaultValue = "0")]
|
||||
public bool EnableTimePeriod { get; set; } = false;
|
||||
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
69
Src/Dlhis.Entity/Device/Entities/DeviceTimePeriodEntity.cs
Normal file
69
Src/Dlhis.Entity/Device/Entities/DeviceTimePeriodEntity.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
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(IsNullable = false, ColumnDescription = "上班开始")]
|
||||
public TimeOnly OnStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上班结束
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "上班结束")]
|
||||
public TimeOnly OnEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下班开始
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "下班开始")]
|
||||
public TimeOnly OffStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下班结束
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "下班结束")]
|
||||
public TimeOnly OffEnd { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(IsNullable = false, UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })]
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Dlhis.Entity.Device.Enums;
|
||||
|
||||
/// <summary>
|
||||
/// 设备时段码分配类型
|
||||
/// </summary>
|
||||
[Description("设备时段码分配类型")]
|
||||
public enum DeviceTimePeriodAssignEnumType
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板
|
||||
/// </summary>
|
||||
[Description("模板")]
|
||||
Template = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 设备
|
||||
/// </summary>
|
||||
[Description("设备")]
|
||||
Device = 2
|
||||
}
|
||||
Reference in New Issue
Block a user