// ============================================================ // GoodBooks ERP — Skill Management Module // DTO : EmployeeSkillProfileDTO // Table : MEMPLOYEESKILL (E1) — primary // Joins : MSKILL (S3), MSKILLGROUP (S2), MSKILLLEVEL (S4), // MEMPLOYEE (employee display name), // MPRODUCTFAMILY (product family name), // MMODEL (model name), // MUSER (assessor name) // Updated: Aligned to new DDL schema v1.0 // ============================================================ namespace SkillManagementDAL.DTO.EmployeeSkillProfile { public class EmployeeSkillProfileDTO { // ── Display-only sequence (not stored) ─────────────────── public int SLNo { get; set; } // 1..N — populated by ROW_NUMBER() in GET queries // ── Primary key ────────────────────────────────────────── public int ProfileId { get; set; } public string? ProfileName { get; set; } // ── Business columns (MEMPLOYEESKILL) ─────────────────── public int EmployeeId { get; set; } public int SkillId { get; set; } public int ProductFamilyId { get; set; } = -1; // -1 = not applicable (General skill) public int ModelId { get; set; } = -1; // -1 = not applicable public byte CurrentLevNo { get; set; } // 0=NotAssessed, 1-4 proficiency level public byte ProfileStatus { get; set; } // 0=NotAssessed, 1=Current, 2=TrainingPlan, 3=Expired public DateTime? AssessedDt { get; set; } public DateTime? TrainingPlanDate { get; set; } public DateTime? ActualTrainDt { get; set; } public DateTime? NextReviewDt { get; set; } public int AssessedById { get; set; } = -1; // -1 = not yet assessed -> FK MUSER.USERID public string? Remarks { get; set; } // ── Standard fields (MEMPLOYEESKILL) ──────────────────── public short Version { get; set; } public byte Status { get; set; } = 1; // 0=Pending,1=Active,2=Deleted,3=Amended,4=Inactive,5=Archived public short SortOrder { get; set; } = 9999; public int CreatedById { get; set; } public DateTime? CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime? ModifiedOn { get; set; } public byte SourceType { get; set; } = 5; // 1=Framework,2=Devadmin,3=Impadmin,4=Admin,5=User public int TenantId { get; set; } // ── Joined display fields — MSKILL (S3) ────────────────── public string? SkillName { get; set; } // MSKILL.SKILLNAME public string? SkillNameFull { get; set; } // MSKILL.SKILLNAMEFULL (new column added in ALTER) public string? SkillCode { get; set; } // MSKILL.SKILLCODE public byte SkillScope { get; set; } // 0=General, 1=ProductFamily, 2=Model public byte IsSpecialChar { get; set; } // 0=No, 1=Yes (renders star in matrix header) public byte LevelCount { get; set; } // MSKILL.LEVELCOUNT (1-4, how many levels defined) public short MatrixSeqNo { get; set; } // MSKILL.MATRIXSEQNO (column order in matrix view) // ── Joined display fields — MSKILLGROUP (S2) ───────────── public int GroupId { get; set; } // MSKILL.GROUPID -> MSKILLGROUP.GROUPID public string? GroupName { get; set; } // MSKILLGROUP.GROUPNAME // ── Joined display fields — MSKILLLEVEL (S4) ───────────── public string? LevelLabel { get; set; } // MSKILLLEVEL.LEVELLABEL (label for CurrentLevNo) public string? LevelDescriptor { get; set; } // MSKILLLEVEL.LEVELDESCRIPTOR // ── Joined display fields — MUSER ──────────────────────── public string? AssessorName { get; set; } // MUSER.USERNAME (ASSESSEDBYID -> MUSER.USERID) // ── Joined display fields — MEMPLOYEE ──────────────────── public string? EmployeeName { get; set; } // MEMPLOYEE display name column public string? Thumbnail { get; set; } // MEMPLOYEE.THUMBNAIL // ── Joined display fields — MPRODUCTFAMILY / MMODEL ────── public string? ProductFamilyName { get; set; } // MPRODUCTFAMILY name (when PRODUCTFAMILYID != -1) public string? ModelName { get; set; } // MMODEL name (when MODELID != -1) } }