feat 工作网格
This commit is contained in:
37
Src/Dlhis.Entity/Basic/Entity/WorkGridEntity.cs
Normal file
37
Src/Dlhis.Entity/Basic/Entity/WorkGridEntity.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar;
|
||||
using Mapster;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 工作网格
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "WorkGrid")]
|
||||
public class WorkGridEntity : SugarBaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 网格code
|
||||
/// </summary>
|
||||
[AdaptIgnore(MemberSide.Destination)]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "网格code")]
|
||||
public Guid Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 网格名称
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "网格名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 负责人工号
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "负责人工号", UniqueGroupNameList = new[] { "idx_WorkGrid_LeaderUserCode" })]
|
||||
public string LeaderUserCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
42
Src/Dlhis.Entity/Basic/Entity/WorkGridScheduleEntity.cs
Normal file
42
Src/Dlhis.Entity/Basic/Entity/WorkGridScheduleEntity.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Kurisu.AspNetCore.DataAccess.Entity;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar;
|
||||
using SqlSugar;
|
||||
using SqlSugar.DbConvert;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "WorkGridSchedule")]
|
||||
public class WorkGridScheduleEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
/// <summary>
|
||||
/// 网格code
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "网格code")]
|
||||
public Guid WorkGridCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排班日期
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "排班日期")]
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排班类型
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "排班类型", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public WorkGridTimePeriodEnumType PeriodType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工号
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "工号")]
|
||||
public string UserCode { get; set; }
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
44
Src/Dlhis.Entity/Basic/Entity/WorkGridTimePeriodEntity.cs
Normal file
44
Src/Dlhis.Entity/Basic/Entity/WorkGridTimePeriodEntity.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Kurisu.AspNetCore.DataAccess.Entity;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar;
|
||||
using Mapster;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 工作网格
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "WorkGridTimePeriod")]
|
||||
public class WorkGridTimePeriodEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
/// <summary>
|
||||
/// 班次
|
||||
/// </summary>
|
||||
[AdaptIgnore(MemberSide.Destination)]
|
||||
public WorkGridTimePeriodEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 前
|
||||
/// </summary>
|
||||
public int Before { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 后
|
||||
/// </summary>
|
||||
public int After { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public TimeOnly Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public TimeOnly End { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(UniqueGroupNameList = new[] { "idx_workGridTimePeriod_type_tenantId" })]
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
35
Src/Dlhis.Entity/Basic/Entity/WorkGridUserEntity.cs
Normal file
35
Src/Dlhis.Entity/Basic/Entity/WorkGridUserEntity.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Kurisu.AspNetCore.DataAccess.Entity;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar;
|
||||
using SqlSugar;
|
||||
using SqlSugar.DbConvert;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 网格人员
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "WorkGridUsers")]
|
||||
public class WorkGridUserEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
/// <summary>
|
||||
/// 网格code
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "网格code")]
|
||||
public Guid WorkGridCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 网格人员
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "网格人员")]
|
||||
public string UserCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排班类型
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "排班类型", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public WorkGridTimePeriodEnumType? ScheduleType { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
22
Src/Dlhis.Entity/Basic/Enums/WorkGridTimePeriodEnumType.cs
Normal file
22
Src/Dlhis.Entity/Basic/Enums/WorkGridTimePeriodEnumType.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Enums;
|
||||
|
||||
/// <summary>
|
||||
/// 网格班次
|
||||
/// </summary>
|
||||
[Description("网格班次")]
|
||||
public enum WorkGridTimePeriodEnumType
|
||||
{
|
||||
/// <summary>
|
||||
/// 白班
|
||||
/// </summary>
|
||||
[Description("白班")]
|
||||
Day = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 晚班
|
||||
/// </summary>
|
||||
[Description("晚班")]
|
||||
Night = 2,
|
||||
}
|
||||
Reference in New Issue
Block a user