| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
- /// <summary>
- /// 产线岗位技能明细(子表)。源平台子表结构待确认;当前以“岗位→人员技能主数据引用”占位实现。
- /// </summary>
- [SugarTable("LineSkillDetail", "产线岗位技能明细")]
- public class AdoS0LineSkillDetail : ITenantIdFilter
- {
- [SugarColumn(ColumnName = "RecID", ColumnDescription = "明细主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
- public long Id { get; set; }
- [SugarColumn(ColumnName = "LineSkillRecID", ColumnDescription = "产线岗位主表ID", ColumnDataType = "bigint")]
- public long LineSkillMasterId { get; set; }
- [SugarColumn(ColumnName = "PersonSkillId", ColumnDescription = "人员技能主数据ID", ColumnDataType = "bigint")]
- public long PersonSkillId { get; set; }
- // ---- 旧系统遗留业务键列 ----
- // 这些列与 IX_LineSkillDetail 唯一索引同源,历史数据(含 1.0.412 种子)全部有值。
- // 此前实体未映射它们,导致 Update 的「删除+重插」把整行的 Domain/ProdLine/JOBNo/SkillNo
- // 写成 NULL —— 明细因此丢失业务键。这里补映射,由服务端从主表与已解析的技能主数据回填。
- //
- // ⚠️ SkillNo 与 PersonSkillId 语义不同,不得互相顶替:
- // SkillNo = 技能【业务编码】快照(字符串,来自 PersonSkill.Code)
- // PersonSkillId = 指向 PersonSkill 主数据的【内部主键】(bigint FK)
- // 当前数据里两者恰好都出现 "102",纯属编码巧合,不是同一个字段。
- [SugarColumn(ColumnName = "Domain", ColumnDescription = "工厂域(旧系统遗留)", Length = 50, IsNullable = true)]
- public string? Domain { get; set; }
- [SugarColumn(ColumnName = "Site", ColumnDescription = "站点/工作组(旧系统遗留,当前全库为 NULL)", Length = 12, IsNullable = true)]
- public string? Site { get; set; }
- [SugarColumn(ColumnName = "ProdLine", ColumnDescription = "生产线编码(旧系统遗留)", Length = 100, IsNullable = true)]
- public string? ProdLine { get; set; }
- [SugarColumn(ColumnName = "JOBNo", ColumnDescription = "岗位编码(旧系统遗留)", Length = 100, IsNullable = true)]
- public string? JOBNo { get; set; }
- [SugarColumn(ColumnName = "SkillNo", ColumnDescription = "技能业务编码快照(旧系统遗留,= PersonSkill.Code)", Length = 100, IsNullable = true)]
- public string? SkillNo { get; set; }
- [SugarColumn(ColumnName = "required_level", ColumnDescription = "要求等级", Length = 50, IsNullable = true)]
- public string? RequiredLevel { get; set; }
- [SugarColumn(ColumnName = "StartDate", ColumnDescription = "生效日期", IsNullable = true)]
- public DateTime? EffectiveDate { get; set; }
- [SugarColumn(ColumnName = "remark", ColumnDescription = "备注", Length = 500, IsNullable = true)]
- public string? Remark { get; set; }
- [SugarColumn(ColumnName = "is_enabled", ColumnDescription = "启用", ColumnDataType = "boolean")]
- public bool IsEnabled { get; set; } = true;
- [SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间")]
- public DateTime CreateTime { get; set; } = DateTime.Now;
- /// <summary>
- /// 人员技能【业务编码】(PersonSkill.Code),不落库、仅用于展示与提交。
- /// PersonSkillId 是内部自增主键,绝不作为前端 select 的业务值;
- /// UI 一律用 Code,保存时由服务端 tenant-safe 解析成 Id。
- /// 注意:与本表的 legacy 列 SkillNo 语义不同 —— SkillNo 是旧系统自带的技能编码快照,
- /// PersonSkillCode 是当前 PersonSkill 主数据的编码,二者可能不同源,不得互相顶替。
- /// </summary>
- [SugarColumn(IsIgnore = true)]
- public string? PersonSkillCode { get; set; }
- /// <summary>人员技能名称(PersonSkill.Name),不落库、仅展示。</summary>
- [SugarColumn(IsIgnore = true)]
- public string? PersonSkillName { get; set; }
- [SugarColumn(ColumnName = "tenant_id", IsNullable = true)]
- public long? TenantId { get; set; }
- }
|