fix 调整时段码结构

This commit is contained in:
2024-07-19 16:10:38 +08:00
parent c7c1bf1ec8
commit a48e34f999
25 changed files with 217 additions and 233 deletions

View File

@@ -195,7 +195,7 @@ public class GainfoEntity : SugarBaseEntity
[SugarColumn(ColumnDescription = "卡类型", IsNullable = true)]
public string CardType { get; set; }
public int? CardType { get; set; }
}
/// <summary>

View File

@@ -1,4 +1,5 @@
using Dlhis.Entity.Device.Enums;
using Dlhis.Entity.Device.Models;
using Kurisu.AspNetCore.DataAccess.Entity;
using Kurisu.AspNetCore.DataAccess.SqlSugar;
using Mapster;
@@ -40,28 +41,10 @@ public class DeviceTimePeriodEntity : SugarBaseEntity, ITenantId
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(IsJson = true, ColumnDataType = "varchar(1000)")]
public List<DeviceWeekDayTimePeriod> Sections { get; set; }
[SugarColumn(IsNullable = false, UniqueGroupNameList = new[] { "unique_DeviceTimePeriod_cardType_assignType_value" })]

View File

@@ -42,6 +42,12 @@ public class DeviceUploadLogEntity : SugarBaseEntity, ITenantId
[SugarColumn(ColumnDataType = "bit")]
public bool Sync { get; set; }
/// <summary>
/// 是否有效
/// </summary>
[SugarColumn(ColumnDataType = "bit")]
public bool Status { get; set; }
[SugarColumn(IndexGroupNameList = new string[] { "idx_DeviceUploadLog_TenantId" })]
public string TenantId { get; set; }

View File

@@ -0,0 +1,8 @@
using Kurisu.AspNetCore.CustomClass;
namespace Dlhis.Entity.Device.Models;
public class DeviceTimePeriod : TimePeriod
{
public bool Enable { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace Dlhis.Entity.Device.Models;
public class DeviceWeekDayTimePeriod
{
/// <summary>
/// 星期
/// </summary>
public DayOfWeek DayOfWeek { get; set; }
/// <summary>
/// 时段
/// </summary>
public List<DeviceTimePeriod> TimePeriods { get; set; }
}