代码优化
This commit is contained in:
@@ -17,6 +17,18 @@ namespace SimpleAdmin.Application;
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
public class ObContractTemplate : BaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 合同模板所属入职业务公司 Id。
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public long? CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 合同模板所属入职业务部门 Id。
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public long? DepartmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 合同模板业务编码。
|
||||
/// </summary>
|
||||
@@ -36,4 +48,28 @@ public class ObContractTemplate : BaseEntity
|
||||
/// 模板用途说明。
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属公司名称,仅用于接口展示。
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属部门名称,仅用于接口展示。
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string DepartmentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 适用岗位 Id 列表,仅用于接口展示和编辑回显。
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<long> PositionIds { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 适用岗位名称列表,仅用于接口展示。
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<string> PositionNames { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace SimpleAdmin.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 合同模板适用岗位关系,用于限制合同模板可被哪些岗位的入职模板选择。
|
||||
/// </summary>
|
||||
[SugarTable("ob_contract_template_position", TableDescription = "合同模板适用岗位")]
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
public class ObContractTemplatePosition : BaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 合同模板主档案 Id。
|
||||
/// </summary>
|
||||
public long ContractTemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 适用岗位 Id。
|
||||
/// </summary>
|
||||
public long PositionId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
namespace SimpleAdmin.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 入职业务部门档案,属于某家入职公司。
|
||||
/// </summary>
|
||||
[SugarTable("ob_department", TableDescription = "入职业务部门")]
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
public class ObDepartment : BaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 所属入职业务公司 Id。
|
||||
/// </summary>
|
||||
public long CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门业务编码。
|
||||
/// </summary>
|
||||
public virtual string DepartmentCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称。
|
||||
/// </summary>
|
||||
public virtual string DepartmentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序码。
|
||||
/// </summary>
|
||||
public int SortCode { get; set; } = 99;
|
||||
|
||||
/// <summary>
|
||||
/// 业务备注。
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属公司名称 (展示用)
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string CompanyName { get; set; }
|
||||
}
|
||||
@@ -37,6 +37,12 @@ public class ObEmployee : BaseEntity
|
||||
/// </summary>
|
||||
public long CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属入职业务部门 Id。
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public long? DepartmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属部门名称。
|
||||
/// </summary>
|
||||
|
||||
@@ -22,6 +22,12 @@ public class ObOnboardingTask : BaseEntity
|
||||
/// </summary>
|
||||
public long CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属入职业务部门 Id。
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public long? DepartmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入职任务所属岗位 Id。
|
||||
/// </summary>
|
||||
@@ -83,6 +89,12 @@ public class ObOnboardingTask : BaseEntity
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称 (展示用)
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string DepartmentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 岗位名称 (展示用)
|
||||
/// </summary>
|
||||
@@ -94,5 +106,4 @@ public class ObOnboardingTask : BaseEntity
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string OnboardingTemplateName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,14 @@ public class ObOnboardingTemplate : BaseEntity
|
||||
/// </summary>
|
||||
public long CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属入职业务部门 Id。
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public long? DepartmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板用途和适用范围说明。
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace SimpleAdmin.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 入职业务岗位档案,保存岗位默认合同期限、试用期及业务参数。
|
||||
/// 入职业务岗位档案,保存岗位所属部门、默认合同期限、试用期及业务参数。
|
||||
/// </summary>
|
||||
[SugarTable("ob_position", TableDescription = "入职业务岗位")]
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
@@ -22,6 +22,12 @@ public class ObPosition : BaseEntity
|
||||
/// </summary>
|
||||
public long CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属入职业务部门 Id。
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public long? DepartmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 岗位业务编码。
|
||||
/// </summary>
|
||||
@@ -51,4 +57,16 @@ public class ObPosition : BaseEntity
|
||||
/// 业务备注。
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属公司名称 (展示用)
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属部门名称 (展示用)
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string DepartmentName { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user