// ============================================================ // GoodBooks ERP — Skill Management Module // DTO : SkillDTO // Table : MSKILL (S3) — Primary Skill Master // Joins : // S1 -> MSKILLDOMAIN // S2 -> MSKILLGROUP // // Child Collection : // Levels -> MSKILLLEVEL (S4) // // Purpose : // Represents a skill definition used in the // Skill Matrix / Competency Matrix system. // // Notes : // • DOMAINID is denormalized from MSKILLGROUP // for reporting/query performance. // // • SKILLSCOPE controls matrix expansion: // 0 = General // 1 = ProductFamily // 2 = Model // // • LEVELCOUNT represents TOTAL number of // proficiency levels available for the skill. // // • ISPECIALCHAR renders special symbol // indicators in matrix headers. // // • Audit fields maintained at parent level. // // Updated : Schema v1.0 // ============================================================ using SkillManagementDAL.DTO.SkillLevel; namespace SkillManagementDAL.DTO.Skill { public class SkillDTO { // ======================================================== // PRIMARY KEY // ======================================================== // MSKILL.SKILLID // Primary key of Skill Master public int SkillId { get; set; } // ======================================================== // BUSINESS COLUMNS — MSKILL // ======================================================== // MSKILL.GROUPID // FK -> MSKILLGROUP.GROUPID // Skill belongs to a functional group/category public int GroupId { get; set; } // MSKILL.DOMAINID // FK -> MSKILLDOMAIN.DOMAINID // Denormalized from group table for faster reporting public int DomainId { get; set; } // MSKILL.SKILLCODE // Unique skill code within tenant public string SkillCode { get; set; } = string.Empty; // MSKILL.SKILLNAME // Short skill name displayed in UI/matrix public string SkillName { get; set; } = string.Empty; // MSKILL.SKILLNAMEFULL // Detailed/full descriptive skill name public string? SkillNameFull { get; set; } // MSKILL.SKILLSCOPE // Controls matrix column expansion // // 0 = General // 1 = ProductFamily // 2 = Model public byte SkillScope { get; set; } // MSKILL.LEVELCOUNT // Total number of proficiency levels // available for this skill // // Example: // 4 = Beginner, Intermediate, Advanced, Expert // // CHECK BETWEEN 1 AND 4 public byte LevelCount { get; set; } = 4; // MSKILL.ISSPECIALCHAR // Indicates whether special indicator/symbol // should be displayed in matrix UI // // true = display special marker // false = normal display public byte IsSpecialChar { get; set; } // MSKILL.MATRIXSEQNO // Left-to-right display order inside matrix public short MatrixSeqNo { get; set; } = 9999; // MSKILL.ISACTIVE // Active flag for skill usability // // true = active // false = inactive public byte IsActive { get; set; } // MSKILL.REMARKS // General remarks/comments public string? Remarks { get; set; } // MSKILL.NOTES // Additional internal notes/documentation public string? Notes { get; set; } // ======================================================== // STANDARD / AUDIT FIELDS — MSKILL // ======================================================== // MSKILL.VERSION // Optimistic concurrency version number public short Version { get; set; } // MSKILL.STATUS // // 0 = Pending // 1 = Active // 2 = Deleted // 3 = Amended // 4 = Inactive // 5 = Archived public byte Status { get; set; } = 1; // MSKILL.SORTORDER // Generic UI/report sorting order public short SortOrder { get; set; } = 9999; // MSKILL.CREATEDBYID // FK -> MUSER.USERID public int CreatedById { get; set; } // MSKILL.CREATEDON // Record creation timestamp public DateTime? CreatedOn { get; set; } // MSKILL.MODIFIEDBYID // FK -> MUSER.USERID public int ModifiedById { get; set; } // MSKILL.MODIFIEDON // Last modification timestamp public DateTime? ModifiedOn { get; set; } // MSKILL.SOURCETYPE // // 1 = Framework // 2 = DevAdmin // 3 = ImpAdmin // 4 = Admin // 5 = User public byte SourceType { get; set; } = 5; // MSKILL.TENANTID // Multi-tenant isolation key public int TenantId { get; set; } // ======================================================== // JOINED DISPLAY FIELDS — LOOKUP TABLES // ======================================================== // MSKILLGROUP.GROUPNAME // Display-only field public string? GroupName { get; set; } // MSKILLDOMAIN.DOMAINNAME // Display-only field public string? DomainName { get; set; } // Computed display text for UI rendering // // Example: // 0 -> General // 1 -> ProductFamily // 2 -> Model public string? SkillScopeText { get; set; } // ======================================================== // CHILD COLLECTION — MSKILLLEVEL (S4) // ======================================================== // Collection of proficiency levels // associated with the skill // // Example: // Level 1 -> Beginner // Level 2 -> Intermediate // Level 3 -> Advanced // Level 4 -> Expert public List Levels { get; set; } = new(); } }