diff --git a/Controllers/DisableController.cs b/Controllers/DisableController.cs index ebae0bb..cb6804a 100644 --- a/Controllers/DisableController.cs +++ b/Controllers/DisableController.cs @@ -283,10 +283,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers #endregion - #region " จัดการรอบการสมัครสอบคัดเลือกอื่นๆ " + #region " จัดการรอบการสมัครสอบคัดเลือกผู้พิการ " /// - /// แสดงข้อมูลรอบการสอบคัดเลือกอื่นๆ + /// แสดงข้อมูลรอบการสอบคัดเลือกผู้พิการ /// /// /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ @@ -341,9 +341,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers } /// - /// แสดงข้อมูลรอบการสอบคัดเลือกอื่นๆเป็นรายการ + /// แสดงข้อมูลรอบการสอบคัดเลือกผู้พิการเป็นรายการ /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง @@ -382,7 +382,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers AnnouncementEndDate = x.AnnouncementEndDate, AnnouncementStartDate = x.AnnouncementStartDate, AnnouncementDate = x.AnnouncementDate, - ScoreExpireDate = x.ScoreExpireDate, CheckDisability = x.CheckDisability, CheckDocument = x.CheckDocument, Detail = x.Detail, @@ -452,7 +451,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers /// - /// เพิ่มข้อมูลรอบการจัดสอบคัดเลือกอื่นๆ + /// เพิ่มข้อมูลรอบการจัดสอบคัดเลือกผู้พิการ /// /// Request parameters /// @@ -488,7 +487,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers PaymentEndDate = req.PaymentEndDate, Note = req.Note, AnnouncementDate = req.AnnouncementDate, - ScoreExpireDate = req.ScoreExpireDate, CheckDisability = true, OrganizationId = req.rootDnaId, CreatedAt = DateTime.Now, @@ -527,9 +525,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers } /// - /// แก้ไขข้อมูลรอบการจัดสอบคัดเลือกอื่นๆ + /// แก้ไขข้อมูลรอบการจัดสอบคัดเลือกผู้พิการ /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// Request parameters /// /// เมื่อทำการเพิ่มข้อมูลสำเร็จ @@ -572,9 +570,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers data.ExamDate = req.ExamDate; data.Note = req.Note; data.AnnouncementDate = req.AnnouncementDate; - // ScoreExpireDate อัปเดตเฉพาะเมื่อ FE ส่งค่ามาเท่านั้น (ไม่บังคับส่ง) - if (req.ScoreExpireDate.HasValue) - data.ScoreExpireDate = req.ScoreExpireDate; data.LastUpdatedAt = DateTime.Now; data.LastUpdateUserId = UserId ?? ""; data.LastUpdateFullName = FullName ?? "System Administrator"; @@ -592,9 +587,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers /// - /// ลบข้อมูลรอบการจัดสอบคัดเลือกอื่นๆ + /// ลบข้อมูลรอบการจัดสอบคัดเลือกผู้พิการ /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// /// เมื่อทำการลบข้อมูลสำเร็จ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง @@ -653,7 +648,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers #region " Candidate Files " /// - /// แสดงข้อมูลสำหรับหน้าจอ รายการนำเข้าข้อมูลผู้สมัครสอบคัดเลือกอื่นๆ + /// แสดงข้อมูลสำหรับหน้าจอ รายการนำเข้าข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ /// /// /// เมื่อแสดงรายการข้อมูลสำเร็จ @@ -709,7 +704,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers ImportYear = x.ScoreImport.Year, ImportDate = x.CreatedAt.Date.ToThaiShortDate(), ScoreCount = x.ScoreImport.Scores.Count(), - ResultCount = x.ScoreImport.Scores.Count(x => x.ExamStatus == "ผ่าน" && !string.IsNullOrEmpty(x.Number)) + ResultCount = x.ScoreImport.Scores.Count(x => !string.IsNullOrEmpty(x.Number)) }, x.CreatedUserId, }) @@ -727,7 +722,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers /// - /// นำเข้ารายชื่อผู้สมัครสอบคัดเลือกอื่นๆ + /// นำเข้ารายชื่อผู้สมัครสอบคัดเลือกผู้พิการ /// /// /// เมื่อทำนำเข้าข้อมูลสำเร็จ @@ -779,7 +774,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers { new DisableImportHistory { - Description = "นำเข้าข้อมูลผู้สมัครสอบคัดเลือกอื่นๆ", + Description = "นำเข้าข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ", CreatedAt = DateTime.Now, CreatedUserId = UserId ?? "", CreatedFullName = FullName ?? "System Administrator", @@ -969,9 +964,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers } /// - /// ลบข้อมูลนำข้อมูลผู้สมัครสอบคัดเลือกอื่นๆ + /// ลบข้อมูลนำข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// /// เมื่อทำนำเข้าข้อมูลสำเร็จ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง @@ -1034,9 +1029,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers } /// - /// แสดงประวัติการนำเข้าข้อมูลการสอบคัดเลือกอื่นๆ + /// แสดงประวัติการนำเข้าข้อมูลการสอบคัดเลือกผู้พิการ /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// /// เมื่อทำนำเข้าข้อมูลสำเร็จ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง @@ -1074,9 +1069,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers /// - /// นำเข้ารายชื่อผู้สมัครสอบคัดเลือกอื่นๆ (ข้อมูลผู้สมัครสอบ) + /// นำเข้ารายชื่อผู้สมัครสอบคัดเลือกผู้พิการ (ข้อมูลผู้สมัครสอบ) /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// /// เมื่อทำนำเข้าข้อมูลสำเร็จ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง @@ -1145,7 +1140,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers // สร้างรอบการบรรจุ โดยเอาเข้ามูลมาใส่จาก Request imported.ImportHostories.Add(new DisableImportHistory { - Description = "นำเข้าข้อมูลผู้สมัครสอบคัดเลือกอื่นๆ", + Description = "นำเข้าข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ", CreatedAt = DateTime.Now, CreatedUserId = UserId ?? "", CreatedFullName = FullName ?? "System Administrator", @@ -1474,9 +1469,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers #region " Score File " /// - /// นำเข้าผลคะแนนสอบคัดเลือกอื่นๆ (บัญชีรวมคะแนน) + /// นำเข้าผลคะแนนสอบคัดเลือกผู้พิการ (บัญชีรวมคะแนน) /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// /// เมื่อทำนำเข้าข้อมูลสำเร็จ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง @@ -1589,7 +1584,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers var r = new DisableScore(); - #region นำเข้าผลคะแนนสอบคัดเลือกอื่นๆ old + #region นำเข้าผลคะแนนสอบคัดเลือกผู้พิการ old ////r.ExamId = workSheet?.Cells[row, 2]?.GetValue(); @@ -1699,9 +1694,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers #region " Result File " /// - /// นำเข้าผลการสอบคัดเลือกอื่นๆ (ผลการสอบ) + /// นำเข้าผลการสอบคัดเลือกผู้พิการ (ผลการสอบ) /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// /// เมื่อทำนำเข้าข้อมูลสำเร็จ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง @@ -1773,7 +1768,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers .Select(g => g.First()) .ToDictionary(s => s.ExamId, s => s); - // ถ้าไม่มีผลคะแนนสอบคัดเลือกอื่นๆให้จบการทำงาน + // ถ้าไม่มีผลคะแนนสอบคัดเลือกผู้พิการให้จบการทำงาน if (score.Count == 0) return Success(); var file = Request.Form.Files[0]; @@ -2066,9 +2061,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers case "notpass": queryWithScores = queryWithScores.Where(x => x.score != null && x.score.ExamStatus == "ไม่ผ่าน"); break; - case "other": - queryWithScores = queryWithScores.Where(x => x.score != null && !new[] { "ขส.", "ผ่าน", "ไม่ผ่าน" }.Contains(x.score.ExamStatus)); - break; } } @@ -2338,15 +2330,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers Score = score == null ? 0.0 : score.TotalScore, Number = score == null ? "" : score.Number, ExamCount = _disableService.GetExamCount(disable.CitizenId), - // เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า) - //ScoreExpire = disable.PeriodExam.AnnouncementDate == null - // ? "" - // : disable.PeriodExam.AnnouncementDate != DateTime.MinValue - // ? disable.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate() - // : "", - ScoreExpire = disable.PeriodExam.ScoreExpireDate == null + ScoreExpire = disable.PeriodExam.AnnouncementDate == null ? "" - : disable.PeriodExam.ScoreExpireDate.Value.ToThaiShortDate(), + : disable.PeriodExam.AnnouncementDate != DateTime.MinValue + ? disable.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate() + : "", typeTest = disable.typeTest, ScoreResult = score == null ? null : new { @@ -2591,7 +2579,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers /// /// ผลคะแนนผู้สมัครสอบ /// - /// รหัสรอบการสอบคัดเลือกอื่นๆ + /// รหัสรอบการสอบคัดเลือกผู้พิการ /// เลขประจำตัวสอบ /// /// เมื่อทำการอ่านข้อมูลจำนวนผู้สอบผ่านแข่งขันเพื่อบรรจุเข้ารับราชการเป็นข้าราชการ กทม. สามัญสำเร็จ @@ -2698,15 +2686,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers T = score != null ? score.TotalScore.ToString().ToThaiNumber() : "", Result = score != null ? score.ExamStatus : "", Number = score != null && score.Number != null ? score.Number.ToString().ToThaiNumber() : "", - // เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า) - //Expire = disable.PeriodExam.AnnouncementDate == null - // ? "" - // : disable.PeriodExam.AnnouncementDate != DateTime.MinValue - // ? disable.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate().ToString().ToThaiNumber() - // : "", - Expire = disable.PeriodExam.ScoreExpireDate == null + Expire = disable.PeriodExam.AnnouncementDate == null ? "" - : disable.PeriodExam.ScoreExpireDate.Value.ToThaiShortDate().ToString().ToThaiNumber(), + : disable.PeriodExam.AnnouncementDate != DateTime.MinValue + ? disable.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate().ToString().ToThaiNumber() + : "", }; var result = new diff --git a/Controllers/DisableReportController.cs b/Controllers/DisableReportController.cs index c0f9f22..eb824dc 100644 --- a/Controllers/DisableReportController.cs +++ b/Controllers/DisableReportController.cs @@ -191,9 +191,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers Number = sr == null ? "" : sr.Number, // ExamCount = 10, // ExamCount = GetExamCountTes(p.CitizenId), - // เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า) - //ScoreExpire = p.PeriodExam.AnnouncementDate == null ? "" : p.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate(), - ScoreExpire = p.PeriodExam.ScoreExpireDate == null ? "" : p.PeriodExam.ScoreExpireDate.Value.ToThaiShortDate(), + ScoreExpire = p.PeriodExam.AnnouncementDate == null ? "" : p.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate(), FullA = sr == null ? 0 : sr.FullA, SumA = sr == null ? 0 : sr.SumA, FullB = sr == null ? 0 : sr.FullB, diff --git a/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/Data/Migrations/ApplicationDbContextModelSnapshot.cs index 22344fb..62950df 100644 --- a/Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Data/Migrations/ApplicationDbContextModelSnapshot.cs @@ -2392,11 +2392,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations .HasColumnOrder(9) .HasComment("รอบการสอบ"); - b.Property("ScoreExpireDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(6) - .HasComment("วันหมดอายุบัญชี"); - b.Property("SetSeat") .HasColumnType("tinyint(1)") .HasComment("เช็คอัพคะแนน"); diff --git a/Migrations/20260701102530_update_PeriodExams_add_ScoreExpireDate.Designer.cs b/Migrations/20260701102530_update_PeriodExams_add_ScoreExpireDate.Designer.cs deleted file mode 100644 index 501a312..0000000 --- a/Migrations/20260701102530_update_PeriodExams_add_ScoreExpireDate.Designer.cs +++ /dev/null @@ -1,3158 +0,0 @@ -// -using System; -using BMA.EHR.Recurit.Exam.Service.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Recurit.Exam.Service.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20260701102530_update_PeriodExams_add_ScoreExpireDate")] - partial class update_PeriodExams_add_ScoreExpireDate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.5") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.BankExam", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AccountName") - .HasColumnType("longtext") - .HasComment("ชื่อบัญชี"); - - b.Property("AccountNumber") - .HasColumnType("longtext") - .HasComment("เลขบัญชี"); - - b.Property("BankName") - .HasColumnType("longtext") - .HasComment("ธนาคาร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("BankExams"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CMSCandidateId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Link") - .HasColumnType("longtext") - .HasComment("ลิงค์"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อลิงค์"); - - b.HasKey("Id"); - - b.HasIndex("CMSCandidateId"); - - b.ToTable("CMSAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("About") - .HasColumnType("longtext") - .HasComment("ข้อมูลเกี่ยวกับเรา"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("BannerImgId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .HasColumnType("longtext") - .HasComment("ข้อมูลเว็บโดยย่อ"); - - b.Property("DistrictId") - .HasColumnType("char(36)") - .HasComment("Id อำเภอ"); - - b.Property("DistrictName") - .HasColumnType("longtext") - .HasComment("อำเภอ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LogoImgId") - .HasColumnType("char(36)"); - - b.Property("NameEn") - .HasColumnType("longtext") - .HasComment("ชื่อเว็บภาษาอังกฤษ"); - - b.Property("NameTh") - .HasColumnType("longtext") - .HasComment("ชื่อเว็บภาษาไทย"); - - b.Property("ProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัด"); - - b.Property("ProvinceName") - .HasColumnType("longtext") - .HasComment("จังหวัด"); - - b.Property("ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อ"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id ตำบล"); - - b.Property("SubDistrictName") - .HasColumnType("longtext") - .HasComment("ตำบล"); - - b.Property("Telephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์"); - - b.Property("ZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("BannerImgId"); - - b.HasIndex("LogoImgId"); - - b.ToTable("CMSCandidates"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSGovernment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CMSCandidateId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Link") - .HasColumnType("longtext") - .HasComment("ลิงค์"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อลิงค์"); - - b.HasKey("Id"); - - b.HasIndex("CMSCandidateId"); - - b.ToTable("CMSGovernments"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenDistrictName") - .HasColumnType("longtext") - .HasComment("เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CitizenProvinceName") - .HasColumnType("longtext") - .HasComment("จังหวัดที่ออกบัตรประชาชน"); - - b.Property("ContactFirstname") - .HasColumnType("longtext") - .HasComment("ชื่อ บุคคลที่สามารถติดต่อได้"); - - b.Property("ContactLastname") - .HasColumnType("longtext") - .HasComment("สกุล บุคคลที่สามารถติดต่อได้"); - - b.Property("ContactPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า บุคคลที่สามารถติดต่อได้"); - - b.Property("ContactPrefixName") - .HasColumnType("longtext") - .HasComment("คำนำหน้า บุคคลที่สามารถติดต่อได้"); - - b.Property("ContactRelations") - .HasColumnType("longtext") - .HasComment("เกี่ยวข้องเป็น บุคคลที่สามารถติดต่อได้"); - - b.Property("ContactTel") - .HasColumnType("longtext") - .HasComment("โทรศัพท์ บุคคลที่สามารถติดต่อได้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictName") - .HasColumnType("longtext") - .HasComment("อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceName") - .HasColumnType("longtext") - .HasComment("จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictName") - .HasColumnType("longtext") - .HasComment("ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamIdenNumber") - .HasColumnType("longtext") - .HasComment("เลขประจำตัวสอบ"); - - b.Property("ExamReason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("FatherPrefixName") - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อบิดา"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อจริง"); - - b.Property("IsShowExamInfo") - .HasColumnType("tinyint(1)") - .HasComment("สถานะ เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MarryPrefixName") - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MotherPrefixName") - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อมารดา"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(3) - .HasComment("สัญชาติ"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("ลำดับที่สอบได้"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("double") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ตำแหน่งปัจจุบัน เบอร์โทรที่ทำงาน"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PaymentDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ชำระเงิน"); - - b.Property("PaymentImgId") - .HasColumnType("char(36)"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.Property("PointA") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ค"); - - b.Property("PointPath1A") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ก ความสามารถในการคิดวิเคราะห์"); - - b.Property("PointPath1C") - .HasColumnType("longtext") - .HasComment("คะแนนภาค คทดสอบสมรรถนะหลัก"); - - b.Property("PointPath2A") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ก ภาษาอังกฤษ"); - - b.Property("PointPath2C") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ค สัมภาษณ์"); - - b.Property("PointPath3A") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ก ความรู้และลักษณะการเป็นข้าราชการที่ดี"); - - b.Property("PointPerA") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ก เปอร์เซนต์"); - - b.Property("PointPerB") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ข เปอร์เซนต์"); - - b.Property("PointPerC") - .HasColumnType("longtext") - .HasComment("คะแนนภาค ค เปอร์เซนต์"); - - b.Property("PointTotalA") - .HasColumnType("longtext") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("longtext") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("longtext") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PositionExamId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าชื่อ"); - - b.Property("PrefixName") - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อ"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("char(36)") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictName") - .HasColumnType("longtext") - .HasComment("อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceName") - .HasColumnType("longtext") - .HasComment("จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictName") - .HasColumnType("longtext") - .HasComment("ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegisterDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันที่สมัคร"); - - b.Property("RejectDetail") - .HasColumnType("longtext") - .HasComment("เหตุผลการไม่อนุมัติ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานภาพ"); - - b.Property("RelationshipName") - .HasColumnType("longtext") - .HasComment("สถานภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("ReligionName") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ResultA") - .HasColumnType("longtext") - .HasComment("ผลสอบภาค ก"); - - b.Property("ResultB") - .HasColumnType("longtext") - .HasComment("ผลสอบภาค ข"); - - b.Property("ResultC") - .HasColumnType("longtext") - .HasComment("ผลสอบภาค ค"); - - b.Property("Review") - .HasColumnType("longtext") - .HasComment("ข้อแนะนำ"); - - b.Property("ReviewPoint") - .HasColumnType("int") - .HasComment("คะแนนความพึงพอใจ"); - - b.Property("SeatNumber") - .HasColumnType("longtext") - .HasComment("เลขที่นั่งสอบ"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("สถานะผู้สมัคร"); - - b.Property("Telephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์"); - - b.Property("UserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("User Id ผู้สมัคร"); - - b.HasKey("Id"); - - b.HasIndex("PaymentImgId"); - - b.HasIndex("PeriodExamId"); - - b.HasIndex("PositionExamId"); - - b.HasIndex("ProfileImgId"); - - b.ToTable("Candidates"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CandidateDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CandidateId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CandidateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CandidateDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CandidateId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DurationEnd") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("ระยะเวลาสิ้นสุด"); - - b.Property("DurationStart") - .HasColumnType("datetime(6)") - .HasColumnOrder(1) - .HasComment("ระยะเวลาเริ่ม"); - - b.Property("Group") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("กลุ่ม/ฝ่าย"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("สังกัด"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("กอง"); - - b.Property("Position") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("RangeDate") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("ระยะเวลา"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ประเภท"); - - b.HasKey("Id"); - - b.HasIndex("CandidateId"); - - b.ToTable("Careers"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApplyDate") - .HasColumnType("datetime(6)"); - - b.Property("CitizenCardExpireDate") - .HasColumnType("datetime(6)"); - - b.Property("CitizenCardIssuer") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasColumnType("datetime(6)"); - - b.Property("ExamId") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.Property("Gendor") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("HddPosition") - .HasColumnType("longtext") - .HasComment("บัญชีสอบ"); - - b.Property("Isspecial") - .IsRequired() - .HasMaxLength(1) - .HasColumnType("varchar(1)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Marry") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("National") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionName") - .HasColumnType("longtext"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Qualified") - .IsRequired() - .HasMaxLength(1) - .HasColumnType("varchar(1)"); - - b.Property("Race") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("RefNo") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Religion") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Remark") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("typeTest") - .HasColumnType("longtext") - .HasComment("ประเภทการสอบภาค ก."); - - b.HasKey("Id"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("Disables"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableAddress", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Address1") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Amphur") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Amphur1") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisableId") - .HasColumnType("char(36)"); - - b.Property("District") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("District1") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Mobile") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Moo") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Moo1") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Province") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Province1") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Road") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Road1") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Soi") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Soi1") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Telephone") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)"); - - b.Property("ZipCode1") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)"); - - b.HasKey("Id"); - - b.HasIndex("DisableId"); - - b.ToTable("DisableAddresses"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("DisableId") - .HasColumnType("char(36)"); - - b.Property("ExpiredDate") - .HasColumnType("datetime(6)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisableId"); - - b.ToTable("DisableCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisableId") - .HasColumnType("char(36)"); - - b.Property("DocumentFileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisableId"); - - b.HasIndex("DocumentFileId"); - - b.ToTable("DisableDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BachelorDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("DisableId") - .HasColumnType("char(36)"); - - b.Property("GPA") - .HasColumnType("double"); - - b.Property("HighDegree") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Major") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("MajorGroupId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("MajorGroupName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Specialist") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("University") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("DisableId"); - - b.ToTable("DisableEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableImportHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการนำเข้า"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("DisableImportHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableOccupation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisableId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Occupation") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Position") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Telephone") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("WorkAge") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Workplace") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("DisableId"); - - b.ToTable("DisableOccupations"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisablePayment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AccountNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Amount") - .HasColumnType("decimal(65,30)"); - - b.Property("BankCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ChequeNo") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ChqueBankCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CompanyCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CreditDebit") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CustomerName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("DisableId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PaymentId") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("PaymentType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("RefNo1") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("TellerId") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("TermBranch") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("TextFile") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("TransDate") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("TransTime") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DisableId"); - - b.ToTable("DisablePayments"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableScore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ABStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ผลประเมิน"); - - b.Property("AStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ผลประเมิน"); - - b.Property("BStatus") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("ภาคความเหมาะสมกับตำแหน่ง ผลประเมิน"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExamAttribute") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("สถานะคัดกรองคุณสมบัติ"); - - b.Property("ExamId") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เลขประจำตัวสอบ"); - - b.Property("ExamStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("สอบได้ / ตก / ขาดสอบ"); - - b.Property("FullA") - .HasColumnType("int") - .HasComment("ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนเต็ม"); - - b.Property("FullB") - .HasColumnType("int"); - - b.Property("FullC") - .HasColumnType("int") - .HasComment("ภาคความเหมาะสมกับตำแหน่ง ทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ คะแนนเต็ม"); - - b.Property("FullD") - .HasColumnType("int") - .HasComment("ภาคความเหมาะสมกับตำแหน่ง สัมภาษณ์ คะแนนเต็ม"); - - b.Property("FullScore") - .HasColumnType("int") - .HasComment("คะแนนเต็ม"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Major") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ลำดับที่สอบได้"); - - b.Property("PercentageA") - .HasColumnType("double") - .HasComment("ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ร้อยละ"); - - b.Property("PercentageB") - .HasColumnType("double"); - - b.Property("PercentageC") - .HasColumnType("double") - .HasComment("ภาคความเหมาะสมกับตำแหน่ง ร้อยละ"); - - b.Property("RemarkExamOrder") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเหตุจากลำดับที่สอบได้"); - - b.Property("RemarkScore") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเหตุจากบัญชีรวมคะแนน"); - - b.Property("ScoreImportId") - .HasColumnType("char(36)"); - - b.Property("SumA") - .HasColumnType("double") - .HasComment("ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนรวม"); - - b.Property("SumAB") - .HasColumnType("double") - .HasComment("ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนรวม"); - - b.Property("SumB") - .HasColumnType("double"); - - b.Property("SumC") - .HasColumnType("double") - .HasComment("ภาคความเหมาะสมกับตำแหน่ง ทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ คะแนนรวม"); - - b.Property("SumCD") - .HasColumnType("double") - .HasComment("ภาคความเหมาะสมกับตำแหน่ง คะแนนรวมทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ และสัมภาษณ์"); - - b.Property("SumD") - .HasColumnType("double") - .HasComment("ภาคความเหมาะสมกับตำแหน่ง สัมภาษณ์ คะแนนรวม"); - - b.Property("TotalScore") - .HasColumnType("double") - .HasComment("คะแนนรวม"); - - b.HasKey("Id"); - - b.HasIndex("ScoreImportId"); - - b.ToTable("DisableScores"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ImportFileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ImportFileId"); - - b.HasIndex("PeriodExamId") - .IsUnique(); - - b.ToTable("ScoreImports"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CandidateId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("EducationLevelExamId") - .HasColumnType("char(36)") - .HasComment("Id วุฒิที่ใช้สมัครสอบ"); - - b.Property("EducationLevelExamName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ใช้สมัครสอบ"); - - b.Property("EducationLevelHighId") - .HasColumnType("char(36)") - .HasComment("Id วุฒิการศึกษาสูงสุด"); - - b.Property("EducationLevelHighName") - .HasColumnType("longtext") - .HasComment("วุฒิการศึกษาสูงสุด"); - - b.Property("EducationLocation") - .HasColumnType("longtext") - .HasComment("ชื่อสถานศึกษา"); - - b.Property("EducationMajor") - .HasColumnType("longtext") - .HasComment("สาขาวิชา/วิชาเอก"); - - b.Property("EducationName") - .HasColumnType("longtext") - .HasComment("ชื่อปริญญา"); - - b.Property("EducationScores") - .HasColumnType("longtext") - .HasComment("คะแนนเฉลี่ยสะสม"); - - b.Property("EducationType") - .HasColumnType("longtext") - .HasComment("ประเภทสถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CandidateId"); - - b.ToTable("Educations"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AnnouncementDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(5) - .HasComment("วันประกาศผลสอบ"); - - b.Property("AnnouncementEndDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(7) - .HasComment("วันสิ้นสุดประกาศ"); - - b.Property("AnnouncementExam") - .HasColumnType("tinyint(1)") - .HasComment("ประกาศนี้มีสมัครสอบคัดเลือก"); - - b.Property("AnnouncementStartDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(6) - .HasComment("วันเริ่มประกาศ"); - - b.Property("AuthName") - .HasColumnType("longtext"); - - b.Property("AuthPosition") - .HasColumnType("longtext"); - - b.Property("Category") - .HasColumnType("longtext") - .HasComment("สำนัก"); - - b.Property("CheckDisability") - .HasColumnType("tinyint(1)") - .HasComment("คนพิการ"); - - b.Property("CheckDocument") - .HasColumnType("tinyint(1)") - .HasComment("ตรวจสอบเอกสารหลังประกาศผลสอบ"); - - b.Property("CompanyCode") - .HasColumnType("longtext") - .HasComment("Company code"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียดสมัครสอบ"); - - b.Property("EditorCondition") - .HasColumnType("longtext") - .HasComment("รายละเอียดเงื่อนไขการสมัคร"); - - b.Property("EditorConfirm") - .HasColumnType("longtext") - .HasComment("รายละเอียดคำรับรอง"); - - b.Property("ExamDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สอบ"); - - b.Property("Fee") - .HasColumnType("float") - .HasComment("ค่าธรรมเนียม"); - - b.Property("GraduationYearLock") - .HasColumnType("int") - .HasComment("ล็อกวันที่สำเร็จการศึกษา (ปี)"); - - b.Property("ImportFileId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(8) - .HasComment("ชื่อการสอบ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("OrganizationCodeId") - .HasColumnType("char(36)") - .HasComment("Id รหัสส่วนราชการ"); - - b.Property("OrganizationCodeName") - .HasColumnType("longtext") - .HasComment("ชื่อรหัสส่วนราชการ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงาน"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("PaymentEndDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(4) - .HasComment("วันสิ้นสุดชำระเงิน"); - - b.Property("PaymentKrungThai") - .HasColumnType("longtext") - .HasComment("ชำระเงินผ่านกรุงไทย"); - - b.Property("PaymentStartDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันเริ่มชำระเงิน"); - - b.Property("Reason") - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("RefNo1") - .HasColumnType("longtext") - .HasComment("Ref No1"); - - b.Property("RegisterEndDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันสิ้นสุดสมัครสอบ"); - - b.Property("RegisterStartDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(1) - .HasComment("วันเริ่มสมัครสอบ"); - - b.Property("Remark") - .HasColumnType("text") - .HasComment("remark"); - - b.Property("Round") - .HasColumnType("int") - .HasColumnOrder(9) - .HasComment("รอบการสอบ"); - - b.Property("ScoreExpireDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(6) - .HasComment("วันหมดอายุบัญชี"); - - b.Property("SetSeat") - .HasColumnType("tinyint(1)") - .HasComment("เช็คอัพคะแนน"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("ImportFileId"); - - b.ToTable("PeriodExams"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamBarCode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("PeriodExamBarCodes"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("PeriodExamDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamImage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("PeriodExamImages"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamQrCode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("PeriodExamQrCodes"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .HasColumnType("longtext") - .HasComment("รหัสประจำตำแหน่งที่สอบ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationLevel") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("ขีดจำกัดวุฒิการศึกษา"); - - b.Property("HighDegree") - .HasColumnType("tinyint(1)") - .HasComment("ปริญญาบัตรขึ้นไป"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PeriodExamId") - .HasColumnType("char(36)"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("TypeId") - .HasColumnType("longtext") - .HasComment("Id ประเภทแบบฟอร์ม"); - - b.Property("TypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทแบบฟอร์ม"); - - b.HasKey("Id"); - - b.HasIndex("PeriodExamId"); - - b.ToTable("PositionExams"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.BankExam", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("BankExam") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSAgency", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", "CMSCandidate") - .WithMany("CMSAgencys") - .HasForeignKey("CMSCandidateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CMSCandidate"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "BannerImg") - .WithMany() - .HasForeignKey("BannerImgId"); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "LogoImg") - .WithMany() - .HasForeignKey("LogoImgId"); - - b.Navigation("BannerImg"); - - b.Navigation("LogoImg"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSGovernment", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", "CMSCandidate") - .WithMany("CMSGovernments") - .HasForeignKey("CMSCandidateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CMSCandidate"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "PaymentImg") - .WithMany() - .HasForeignKey("PaymentImgId"); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("Candidate") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", "PositionExam") - .WithMany() - .HasForeignKey("PositionExamId"); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.Navigation("PaymentImg"); - - b.Navigation("PeriodExam"); - - b.Navigation("PositionExam"); - - b.Navigation("ProfileImg"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CandidateDocument", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") - .WithMany() - .HasForeignKey("CandidateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Candidate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") - .WithMany("Careers") - .HasForeignKey("CandidateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Candidate"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("Disables") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableAddress", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") - .WithMany("Addresses") - .HasForeignKey("DisableId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Disable"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableCertificate", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") - .WithMany("Certificates") - .HasForeignKey("DisableId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Disable"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableDocument", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") - .WithMany("Documents") - .HasForeignKey("DisableId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "DocumentFile") - .WithMany() - .HasForeignKey("DocumentFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Disable"); - - b.Navigation("DocumentFile"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableEducation", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") - .WithMany("Educations") - .HasForeignKey("DisableId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Disable"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableImportHistory", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("ImportHostories") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableOccupation", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") - .WithMany("Occupations") - .HasForeignKey("DisableId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Disable"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisablePayment", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") - .WithMany("Payments") - .HasForeignKey("DisableId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Disable"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableScore", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", "ScoreImport") - .WithMany("Scores") - .HasForeignKey("ScoreImportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ScoreImport"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ImportFile") - .WithMany() - .HasForeignKey("ImportFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithOne("ScoreImport") - .HasForeignKey("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", "PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ImportFile"); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") - .WithMany("Educations") - .HasForeignKey("CandidateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Candidate"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ImportFile") - .WithMany() - .HasForeignKey("ImportFileId"); - - b.Navigation("ImportFile"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamBarCode", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("PeriodExamBarCodes") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamDocument", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("PeriodExamDocuments") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamImage", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("PeriodExamImages") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamQrCode", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("PeriodExamQrCodes") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", b => - { - b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") - .WithMany("PositionExam") - .HasForeignKey("PeriodExamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PeriodExam"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => - { - b.Navigation("CMSAgencys"); - - b.Navigation("CMSGovernments"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b => - { - b.Navigation("Careers"); - - b.Navigation("Educations"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => - { - b.Navigation("Addresses"); - - b.Navigation("Certificates"); - - b.Navigation("Documents"); - - b.Navigation("Educations"); - - b.Navigation("Occupations"); - - b.Navigation("Payments"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => - { - b.Navigation("Scores"); - }); - - modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => - { - b.Navigation("BankExam"); - - b.Navigation("Candidate"); - - b.Navigation("Disables"); - - b.Navigation("ImportHostories"); - - b.Navigation("PeriodExamBarCodes"); - - b.Navigation("PeriodExamDocuments"); - - b.Navigation("PeriodExamImages"); - - b.Navigation("PeriodExamQrCodes"); - - b.Navigation("PositionExam"); - - b.Navigation("ScoreImport"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Migrations/20260701102530_update_PeriodExams_add_ScoreExpireDate.cs b/Migrations/20260701102530_update_PeriodExams_add_ScoreExpireDate.cs deleted file mode 100644 index b896570..0000000 --- a/Migrations/20260701102530_update_PeriodExams_add_ScoreExpireDate.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Recurit.Exam.Service.Migrations -{ - /// - public partial class update_PeriodExams_add_ScoreExpireDate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ScoreExpireDate", - table: "PeriodExams", - type: "datetime(6)", - nullable: true, - comment: "วันหมดอายุบัญชี") - .Annotation("Relational:ColumnOrder", 6); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ScoreExpireDate", - table: "PeriodExams"); - } - } -} diff --git a/Models/PeriodExam.cs b/Models/PeriodExam.cs index 5557563..4345aaa 100644 --- a/Models/PeriodExam.cs +++ b/Models/PeriodExam.cs @@ -41,9 +41,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Models [Column(Order = 5), Comment("วันประกาศผลสอบ")] public DateTime? AnnouncementDate { get; set; } - [Column(Order = 6), Comment("วันหมดอายุบัญชี")] - public DateTime? ScoreExpireDate { get; set; } - [Required, Column(Order = 6), Comment("วันเริ่มประกาศ")] public DateTime AnnouncementStartDate { get; set; } = DateTime.Now.Date; diff --git a/Request/Disables/PostDisableImportRequest.cs b/Request/Disables/PostDisableImportRequest.cs index b88dd73..2eab546 100644 --- a/Request/Disables/PostDisableImportRequest.cs +++ b/Request/Disables/PostDisableImportRequest.cs @@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations; namespace BMA.EHR.Recurit.Exam.Service.Request.Disables { /// - /// ตัวแปรสำหรับสร้างข้อมูลการสอบคัดเลือกอื่นๆ + /// ตัวแปรสำหรับสร้างข้อมูลการสอบคัดเลือกผู้พิการ /// public class PostDisableImportRequest { @@ -83,11 +83,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Request.Disables /// public DateTime AnnouncementDate { get; set; } - /// - /// วันหมดอายุบัญชี (ไม่บังคับส่ง) - /// - public DateTime? ScoreExpireDate { get; set; } - /// /// รหัส DNA หน่วยงาน /// diff --git a/Request/RequestPeriodExam.cs b/Request/RequestPeriodExam.cs index ca37985..b44a4b8 100644 --- a/Request/RequestPeriodExam.cs +++ b/Request/RequestPeriodExam.cs @@ -17,7 +17,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Request public DateTime AnnouncementStartDate { get; set; } = DateTime.Now.Date; public DateTime AnnouncementEndDate { get; set; } = DateTime.Now.Date; public DateTime? AnnouncementDate { get; set; } - public DateTime? ScoreExpireDate { get; set; } public DateTime? ExamDate { get; set; } public Guid? OrganizationCodeId { get; set; } public string? OrganizationCodeName { get; set; } diff --git a/Response/PeriodExamCandidateResponseItem.cs b/Response/PeriodExamCandidateResponseItem.cs index 2b44d0f..31fcf05 100644 --- a/Response/PeriodExamCandidateResponseItem.cs +++ b/Response/PeriodExamCandidateResponseItem.cs @@ -20,7 +20,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Response public DateTime AnnouncementStartDate { get; set; } public DateTime AnnouncementEndDate { get; set; } public DateTime? AnnouncementDate { get; set; } - public DateTime? ScoreExpireDate { get; set; } public DateTime? ExamDate { get; set; } public Guid? OrganizationCodeId { get; set; } public string? OrganizationCodeName { get; set; } diff --git a/Services/CandidateService.cs b/Services/CandidateService.cs index 72f2ee9..2319b65 100644 --- a/Services/CandidateService.cs +++ b/Services/CandidateService.cs @@ -2480,9 +2480,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services Number = candidate.Number, ReviewPoint = candidate.ReviewPoint, Review = candidate.Review, - // เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า) - //AnnouncementDate = exam.AnnouncementDate?.AddYears(2), - AnnouncementDate = exam.ScoreExpireDate, + AnnouncementDate = exam.AnnouncementDate?.AddYears(2), Id = candidate.Id, Position = positionName, PositionLevel = positionLevelName, @@ -2542,9 +2540,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services Number = candidate.Number, ReviewPoint = candidate.ReviewPoint, Review = candidate.Review, - // เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า) - //AnnouncementDate = candidate.PeriodExam?.AnnouncementDate?.AddYears(2), - AnnouncementDate = candidate.PeriodExam?.ScoreExpireDate, + AnnouncementDate = candidate.PeriodExam?.AnnouncementDate?.AddYears(2), Id = candidate.Id, Position = positionName, PositionLevel = positionLevelName, diff --git a/Services/PeriodExamService.cs b/Services/PeriodExamService.cs index d3a3ee6..2d417e5 100644 --- a/Services/PeriodExamService.cs +++ b/Services/PeriodExamService.cs @@ -11,7 +11,6 @@ using Microsoft.EntityFrameworkCore; using OfficeOpenXml; using OfficeOpenXml.Style; using System.Text; -using System.Text.RegularExpressions; using Newtonsoft.Json; using System.Net.Http.Headers; @@ -109,7 +108,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services AnnouncementEndDate = x.AnnouncementEndDate, AnnouncementStartDate = x.AnnouncementStartDate, AnnouncementDate = x.AnnouncementDate, - ScoreExpireDate = x.ScoreExpireDate, CheckDisability = x.CheckDisability, CheckDocument = x.CheckDocument, Detail = x.Detail, @@ -159,7 +157,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services AnnouncementEndDate = x.AnnouncementEndDate, AnnouncementStartDate = x.AnnouncementStartDate, AnnouncementDate = x.AnnouncementDate, - ScoreExpireDate = x.ScoreExpireDate, CheckDisability = x.CheckDisability, CheckDocument = x.CheckDocument, Detail = x.Detail, @@ -355,7 +352,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services PaymentEndDate = inserted.PaymentEndDate, AnnouncementStartDate = inserted.AnnouncementStartDate, AnnouncementDate = inserted.AnnouncementDate, - ScoreExpireDate = inserted.ScoreExpireDate, ExamDate = inserted.ExamDate, AnnouncementEndDate = inserted.AnnouncementEndDate, OrganizationCodeId = inserted.OrganizationCodeId, @@ -458,9 +454,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services periodExam.PaymentEndDate = updated.PaymentEndDate; periodExam.AnnouncementStartDate = updated.AnnouncementStartDate; periodExam.AnnouncementDate = updated.AnnouncementDate; - // ScoreExpireDate อัปเดตเฉพาะเมื่อ FE ส่งค่ามาเท่านั้น (ไม่บังคับส่ง) - if (updated.ScoreExpireDate.HasValue) - periodExam.ScoreExpireDate = updated.ScoreExpireDate; periodExam.ExamDate = updated.ExamDate; periodExam.AnnouncementEndDate = updated.AnnouncementEndDate; periodExam.OrganizationCodeId = updated.OrganizationCodeId; @@ -1144,7 +1137,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services for (int row = 4; row <= rowCount; row++) { System.Diagnostics.Debug.WriteLine(worksheet); - if (worksheet.Cells[row, 2].Value == null) continue; + // if (worksheet.Cells[row, 2].Value != null) + // { list.Add(new RequestImportSeat { Number = worksheet.Cells[row, 1].Value != null ? worksheet.Cells[row, 1].Value.ToString() : null, @@ -1152,57 +1146,58 @@ namespace BMA.EHR.Recurit.Exam.Service.Services CitizenId = worksheet.Cells[row, 3].Value != null ? worksheet.Cells[row, 3].Value.ToString() : null, SeatNumber = worksheet.Cells[row, 4].Value != null ? worksheet.Cells[row, 4].Value.ToString() : null, - PointPath1A = worksheet.Cells[row, 9].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 9].Value.ToString()) : null, - PointPath2A = worksheet.Cells[row, 10].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 10].Value.ToString()) : null, - PointPath3A = worksheet.Cells[row, 11].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 11].Value.ToString()) : null, - PointTotalA = worksheet.Cells[3, 12].Value != null ? ExtractFirstNumber(worksheet.Cells[3, 12].Value.ToString()) : null, - PointA = worksheet.Cells[row, 12].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 12].Value.ToString()) : null, - PointPerA = worksheet.Cells[row, 13].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 13].Value.ToString()) : null, + PointPath1A = worksheet.Cells[row, 9].Value != null ? worksheet.Cells[row, 9].Value.ToString() : null, + PointPath2A = worksheet.Cells[row, 10].Value != null ? worksheet.Cells[row, 10].Value.ToString() : null, + PointPath3A = worksheet.Cells[row, 11].Value != null ? worksheet.Cells[row, 11].Value.ToString() : null, + PointTotalA = worksheet.Cells[3, 12].Value != null ? worksheet.Cells[3, 12].Value.ToString()?.Split(" ")[0] : null, + PointA = worksheet.Cells[row, 12].Value != null ? worksheet.Cells[row, 12].Value.ToString() : null, + PointPerA = worksheet.Cells[row, 13].Value != null ? worksheet.Cells[row, 13].Value.ToString() : null, ResultA = worksheet.Cells[row, 14].Value != null ? worksheet.Cells[row, 14].Value.ToString() : null, - PointTotalB = worksheet.Cells[3, 15].Value != null ? ExtractFirstNumber(worksheet.Cells[3, 15].Value.ToString()) : null, - PointB = worksheet.Cells[row, 15].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 15].Value.ToString()) : null, - PointPerB = worksheet.Cells[row, 16].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 16].Value.ToString()) : null, + PointTotalB = worksheet.Cells[3, 15].Value != null ? worksheet.Cells[3, 15].Value.ToString()?.Split(" ")[0] : null, + PointB = worksheet.Cells[row, 15].Value != null ? worksheet.Cells[row, 15].Value.ToString() : null, + PointPerB = worksheet.Cells[row, 16].Value != null ? worksheet.Cells[row, 16].Value.ToString() : null, ResultB = worksheet.Cells[row, 17].Value != null ? worksheet.Cells[row, 17].Value.ToString() : null, - PointPath1C = worksheet.Cells[row, 18].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 18].Value.ToString()) : null, - PointPath2C = worksheet.Cells[row, 19].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 19].Value.ToString()) : null, - PointTotalC = worksheet.Cells[3, 20].Value != null ? ExtractFirstNumber(worksheet.Cells[3, 20].Value.ToString()) : null, - PointC = worksheet.Cells[row, 20].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 20].Value.ToString()) : null, - PointPerC = worksheet.Cells[row, 21].Value != null ? ExtractFirstNumber(worksheet.Cells[row, 21].Value.ToString()) : null, + PointPath1C = worksheet.Cells[row, 18].Value != null ? worksheet.Cells[row, 18].Value.ToString() : null, + PointPath2C = worksheet.Cells[row, 19].Value != null ? worksheet.Cells[row, 19].Value.ToString() : null, + PointTotalC = worksheet.Cells[3, 20].Value != null ? worksheet.Cells[3, 20].Value.ToString()?.Split(" ")[0] : null, + PointC = worksheet.Cells[row, 20].Value != null ? worksheet.Cells[row, 20].Value.ToString() : null, + PointPerC = worksheet.Cells[row, 21].Value != null ? worksheet.Cells[row, 21].Value.ToString() : null, ResultC = worksheet.Cells[row, 22].Value != null ? worksheet.Cells[row, 22].Value.ToString() : null, Pass = worksheet.Cells[row, 23].Value != null ? worksheet.Cells[row, 23].Value.ToString() : null, ExamReason = worksheet.Cells[row, 27].Value != null ? worksheet.Cells[row, 27].Value.ToString() : null, }); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 9].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ I)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 10].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ J)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 11].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ K)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[3, 12].Value?.ToString()) ?? "0", out _)) - throw new Exception($"รูปแบบคะแนนรวมไม่ถูกต้อง กรุณากรอกตัวเลขนำหน้า เช่น '100 คะเนน' หรือ '100' หรือเว้นว่างไว้ (แถวที่ 3 คอลัมน์ L)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 12].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ L)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 13].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ M)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[3, 15].Value?.ToString()) ?? "0", out _)) - throw new Exception($"รูปแบบคะแนนรวมไม่ถูกต้อง กรุณากรอกตัวเลขนำหน้า เช่น '100 คะเนน' หรือ '100' หรือเว้นว่างไว้ (แถวที่ 3 คอลัมน์ O)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 15].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ O)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 16].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ P)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 18].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ R)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 19].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ S)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[3, 20].Value?.ToString()) ?? "0", out _)) - throw new Exception($"รูปแบบคะแนนรวมไม่ถูกต้อง กรุณากรอกตัวเลขนำหน้า เช่น '100 คะเนน' หรือ '100' หรือเว้นว่างไว้ (แถวที่ 3 คอลัมน์ T)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 20].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ T)"); - if (!int.TryParse(ExtractFirstNumber(worksheet.Cells[row, 21].Value?.ToString()) ?? "0", out _)) - throw new Exception($"กรอกจำนวนคะแนนไม่ถูกต้อง (แถวที่ {row} คอลัมน์ U)"); + if (!int.TryParse(worksheet.Cells[row, 9].Value != null ? worksheet.Cells[row, 9].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 10].Value != null ? worksheet.Cells[row, 10].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 11].Value != null ? worksheet.Cells[row, 11].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[3, 12].Value != null ? worksheet.Cells[3, 12].Value.ToString()?.Split(" ")[0] : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 12].Value != null ? worksheet.Cells[row, 12].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 13].Value != null ? worksheet.Cells[row, 13].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[3, 15].Value != null ? worksheet.Cells[3, 15].Value.ToString()?.Split(" ")[0] : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 15].Value != null ? worksheet.Cells[row, 15].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 16].Value != null ? worksheet.Cells[row, 16].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 18].Value != null ? worksheet.Cells[row, 18].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 19].Value != null ? worksheet.Cells[row, 19].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[3, 20].Value != null ? worksheet.Cells[3, 20].Value.ToString()?.Split(" ")[0] : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 20].Value != null ? worksheet.Cells[row, 20].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + if (!int.TryParse(worksheet.Cells[row, 21].Value != null ? worksheet.Cells[row, 21].Value.ToString() : "0", out _)) + throw new Exception("กรอกจำนวนคะแนนไม่ถูกต้อง"); + // } } } } @@ -1210,20 +1205,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services return list; } - /// - /// ดึงเฉพาะส่วนตัวเลขนำหน้าจากค่าในเซลล์คะแนน - /// เช่น "100 คะแนน" / "100คะแนน" / " 100 " -> "100" - /// รองรับทั้งกรณีมี/ไม่มีช่องว่างคั่น หากเซลล์ว่างจะคืน null (เพื่อเก็บ NULL ใน DB) - /// หมายเหตุ: จุดที่ใช้ตรวจสอบ (validation) ต้องใส่ ?? "0" เพื่อให้ค่าว่างผ่านการตรวจ - /// - private static string? ExtractFirstNumber(string? raw) - { - if (string.IsNullOrWhiteSpace(raw)) - return null; - var match = Regex.Match(raw, @"^\s*\d+"); - return match.Success ? match.Value : raw.Trim(); - } - public async Task UploadSeatCandidateAsync(string examId, IFormFile excels) { var periodExam = await _context.PeriodExams.AsQueryable() @@ -1353,8 +1334,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services candidate.PointPerC = item.PointPerC; candidate.ResultC = item.ResultC; candidate.Pass = item.Pass; - candidate.ExamReason = string.IsNullOrWhiteSpace(item.ExamReason) ? null : item.ExamReason; - candidate.Number = string.IsNullOrWhiteSpace(item.Number) ? null : item.Number; + candidate.ExamReason = item.ExamReason; + candidate.Number = item.Number; // var subject = "แจ้งผลการสมัครสอบคัดเลือก " + periodExam.Name; // var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: สอบคัดเลือกสำเร็จ
" + "ผลการสอบของท่าน คือ " + candidate.Pass; // if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email); @@ -1588,37 +1569,37 @@ namespace BMA.EHR.Recurit.Exam.Service.Services { _data.Add(new { - Number = item.Number != null ? item.Number.ToString() : "", - ExamIdenNumber = item.ExamIdenNumber != null ? item.ExamIdenNumber.ToString() : "", - CitizenId = item.CitizenId != null ? item.CitizenId.ToString() : "", - SeatNumber = item.SeatNumber != null ? item.SeatNumber.ToString() : "", - PrefixName = item.PrefixName != null ? item.PrefixName.ToString() : "", - FullName = item.FirstName != null && item.LastName != null ? $"{item.FirstName} {item.LastName}" : "", - PositionName = item.PositionExam != null && item.PositionExam?.PositionName != null ? item.PositionExam?.PositionName.ToString() : "", - PositionLevelName = item.PositionExam != null && item.PositionExam?.PositionLevelName != null ? item.PositionExam?.PositionLevelName.ToString() : "", + Number = item.Number != null ? item.Number.ToString() : "-", + ExamIdenNumber = item.ExamIdenNumber != null ? item.ExamIdenNumber.ToString() : "-", + CitizenId = item.CitizenId != null ? item.CitizenId.ToString() : "-", + SeatNumber = item.SeatNumber != null ? item.SeatNumber.ToString() : "-", + PrefixName = item.PrefixName != null ? item.PrefixName.ToString() : "-", + FullName = item.FirstName != null && item.LastName != null ? $"{item.FirstName} {item.LastName}" : "-", + PositionName = item.PositionExam != null && item.PositionExam?.PositionName != null ? item.PositionExam?.PositionName.ToString() : "-", + PositionLevelName = item.PositionExam != null && item.PositionExam?.PositionLevelName != null ? item.PositionExam?.PositionLevelName.ToString() : "-", - PointPath1A = item.PointPath1A != null ? item.PointPath1A.ToString() : "", - PointPath2A = item.PointPath2A != null ? item.PointPath2A.ToString() : "", - PointPath3A = item.PointPath3A != null ? item.PointPath3A.ToString() : "", - PointA = item.PointA != null ? item.PointA.ToString() : "", - PointPerA = item.PointPerA != null ? item.PointPerA.ToString() : "", - ResultA = item.ResultA != null ? item.ResultA.ToString() : "", + PointPath1A = item.PointPath1A != null ? item.PointPath1A.ToString() : "0", + PointPath2A = item.PointPath2A != null ? item.PointPath2A.ToString() : "0", + PointPath3A = item.PointPath3A != null ? item.PointPath3A.ToString() : "0", + PointA = item.PointA != null ? item.PointA.ToString() : "0", + PointPerA = item.PointPerA != null ? item.PointPerA.ToString() : "0", + ResultA = item.ResultA != null ? item.ResultA.ToString() : "-", - PointB = item.PointB != null ? item.PointB.ToString() : "", - PointPerB = item.PointPerB != null ? item.PointPerB.ToString() : "", - ResultB = item.ResultB != null ? item.ResultB.ToString() : "", + PointB = item.PointB != null ? item.PointB.ToString() : "0", + PointPerB = item.PointPerB != null ? item.PointPerB.ToString() : "0", + ResultB = item.ResultB != null ? item.ResultB.ToString() : "-", - PointPath1C = item.PointPath1C != null ? item.PointPath1C.ToString() : "", - PointPath2C = item.PointPath2C != null ? item.PointPath2C.ToString() : "", - PointC = item.PointC != null ? item.PointC.ToString() : "", - PointPerC = item.PointPerC != null ? item.PointPerC.ToString() : "", - ResultC = item.ResultC != null ? item.ResultC.ToString() : "", + PointPath1C = item.PointPath1C != null ? item.PointPath1C.ToString() : "0", + PointPath2C = item.PointPath2C != null ? item.PointPath2C.ToString() : "0", + PointC = item.PointC != null ? item.PointC.ToString() : "0", + PointPerC = item.PointPerC != null ? item.PointPerC.ToString() : "0", + ResultC = item.ResultC != null ? item.ResultC.ToString() : "-", - Pass = item.Pass != null ? item.Pass.ToString() : "", + Pass = item.Pass != null ? item.Pass.ToString() : "-", PaymentStatus = item.PeriodExam == null || item.PeriodExam.Fee <= 0 ? "ไม่มีชำระเงิน" : (item.PaymentDate == null ? "ยังไม่ชำระเงิน" : "ชำระแล้ว"), - PaymentDate = item.PaymentDate == null ? "" : $"{item.PaymentDate.Value.ToThaiShortDate()} {item.PaymentDate.Value:HH:mm:ss.ffff}".ToString(), - RegisterDate = item.RegisterDate == null ? "" : $"{item.RegisterDate.Value.ToThaiShortDate()} {item.RegisterDate.Value:HH:mm:ss.ffff}".ToString(), - ExamReason = item.ExamReason != null ? item.ExamReason.ToString() : "" + PaymentDate = item.PaymentDate == null ? "-" : $"{item.PaymentDate.Value.ToThaiShortDate()} {item.PaymentDate.Value:HH:mm:ss.ffff}".ToString(), + RegisterDate = item.RegisterDate == null ? "-" : $"{item.RegisterDate.Value.ToThaiShortDate()} {item.RegisterDate.Value:HH:mm:ss.ffff}".ToString(), + ExamReason = item.ExamReason != null ? item.ExamReason.ToString() : "-" }); } } @@ -1626,37 +1607,37 @@ namespace BMA.EHR.Recurit.Exam.Service.Services { _data.Add(new { - Number = "", - ExamIdenNumber = "", - CitizenId = "", - SeatNumber = "", - PrefixName = "", - FullName = "", - PositionName = "", - PositionLevelName = "", + Number = "-", + ExamIdenNumber = "-", + CitizenId = "-", + SeatNumber = "-", + PrefixName = "-", + FullName = "-", + PositionName = "-", + PositionLevelName = "-", - PointPath1A = "", - PointPath2A = "", - PointPath3A = "", - PointA = "", - PointPerA = "", - ResultA = "", + PointPath1A = "-", + PointPath2A = "-", + PointPath3A = "-", + PointA = "-", + PointPerA = "-", + ResultA = "-", - PointB = "", - PointPerB = "", - ResultB = "", + PointB = "-", + PointPerB = "-", + ResultB = "-", - PointPath1C = "", - PointPath2C = "", - PointC = "", - PointPerC = "", - ResultC = "", + PointPath1C = "-", + PointPath2C = "-", + PointC = "-", + PointPerC = "-", + ResultC = "-", - Pass = "", - PaymentStatus = "", - PaymentDate = "", - RegisterDate = "", - ExamReason = "" + Pass = "-", + PaymentStatus = "-", + PaymentDate = "-", + RegisterDate = "-", + ExamReason = "-" }); } @@ -2984,9 +2965,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services Number = periodExam.Candidate.Where(x => x.Status.Contains("done")).Count(), PlacementType = await _contextMetadata.PlacementTypes.FirstOrDefaultAsync(x => x.Name.Trim().ToUpper().Contains("สอบคัดเลือก")) == null ? await _contextMetadata.PlacementTypes.FirstOrDefaultAsync() : await _contextMetadata.PlacementTypes.FirstOrDefaultAsync(x => x.Name.Trim().ToUpper().Contains("สอบคัดเลือก")), StartDate = DateTime.Now, - // เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า) - //EndDate = DateTime.Now.AddYears(2).AddDays(-1), - EndDate = periodExam.ScoreExpireDate ?? DateTime.Now.AddYears(2).AddDays(-1), + EndDate = DateTime.Now.AddYears(2).AddDays(-1), CreatedAt = DateTime.Now, CreatedUserId = UserId ?? "", CreatedFullName = FullName ?? "", @@ -3218,9 +3197,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services Number = await _context.Disables.AsQueryable().Where(x => x.PeriodExam == periodExam).CountAsync(), PlacementType = placementTypesCache.FirstOrDefault(x => x.Name.Trim().ToUpper().Contains("คัดเลือกอื่นๆ")) ?? placementTypesCache.First(), StartDate = accountStartDate, - // เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า) - //EndDate = accountStartDate.AddYears(2).AddDays(-1), - EndDate = periodExam.ScoreExpireDate ?? accountStartDate.AddYears(2).AddDays(-1), + EndDate = accountStartDate.AddYears(2).AddDays(-1), CreatedAt = DateTime.Now, CreatedUserId = UserId ?? "", CreatedFullName = FullName ?? "",