diff --git a/BMA.EHR.Recruit.Service.csproj b/BMA.EHR.Recruit.Service.csproj index c39d62f..145bcf4 100644 --- a/BMA.EHR.Recruit.Service.csproj +++ b/BMA.EHR.Recruit.Service.csproj @@ -65,6 +65,9 @@ PreserveNewest + + PreserveNewest + diff --git a/Controllers/RecruitController.cs b/Controllers/RecruitController.cs index a4a9be1..949e26b 100644 --- a/Controllers/RecruitController.cs +++ b/Controllers/RecruitController.cs @@ -1189,6 +1189,7 @@ namespace BMA.EHR.Recruit.Service.Controllers r.CStatus = workSheet?.Cells[row, 22]?.GetValue(); r.ExamStatus = workSheet?.Cells[row, 24]?.GetValue(); + r.Number = workSheet?.Cells[row, 25]?.GetValue() ?? ""; r.Major = workSheet.Name; @@ -1325,6 +1326,7 @@ namespace BMA.EHR.Recruit.Service.Controllers position_name = dr["position_name"].ToString(), exam_name = dr["exam_name"].ToString(), exam_order = dr["exam_order"].ToString(), + score_year = Convert.ToInt32(dr["score_year"]).ToThaiYear().ToString(), }); } @@ -1382,7 +1384,6 @@ namespace BMA.EHR.Recruit.Service.Controllers } } - [HttpGet("exam/{id:length(36)}/{examId}")] public async Task> GetExamResultByPersonAsync(Guid id, string examId) { @@ -1415,7 +1416,14 @@ namespace BMA.EHR.Recruit.Service.Controllers IsSpecial = p.Isspecial, Remark = p.Remark, University = p.Educations.First().University, + PositionName = p.PositionName, + ExamName = p.RecruitImport.Name, + ExamOrder = p.RecruitImport.Order, + ExamYear = p.RecruitImport.Year.ToThaiYear(), Score = sr == null ? 0 : sr.SumA + sr.SumB + sr.SumC, + Number = sr == null ? "" : sr.Number, + ExamCount = _recruitService.GetExamCount(p.CitizenId), + ScoreExpire = p.RecruitImport.AnnouncementDate == null ? "" : p.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate(), ScoreResult = sr == null ? null : new { ScoreAFull = sr.FullA, @@ -1577,7 +1585,7 @@ namespace BMA.EHR.Recruit.Service.Controllers if (data == null) return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - if(data_pass == null) + if (data_pass == null) return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); var header = $"{data.Name} ครั้งที่ {data.Order}/{data.Year.ToThaiYear()}"; @@ -1605,7 +1613,8 @@ namespace BMA.EHR.Recruit.Service.Controllers r.LastName, s.FullA, s.SumA, - s.AStatus + s.AStatus, + }).ToList(); // copy template @@ -1627,7 +1636,113 @@ namespace BMA.EHR.Recruit.Service.Controllers workSheet.Cells[row, 3].Value = $"{item.Prefix}{item.FirstName} {item.LastName}"; workSheet.Cells[row, 4].Value = item.FullA; workSheet.Cells[row, 5].Value = item.SumA; - workSheet.Cells[row, 6].Value = ""; + workSheet.Cells[row, 6].Value = item.AStatus; + + row++; + } + + excel.Save(); + + using (FileStream fs = new FileStream(exportFile, FileMode.Open, FileAccess.Read)) + { + byte[] bytes = System.IO.File.ReadAllBytes(exportFile); + fs.Read(bytes, 0, System.Convert.ToInt32(fs.Length)); + fs.Close(); + + var fname = Path.GetFileName(exportFile); + + Response.Headers["Content-Disposition"] = $"inline; filename={fname}"; + + var ret = new FileContentResult(bytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") + { + FileDownloadName = fname + }; + + return ret; + } + } + } + catch (Exception ex) + { + return Error(ex, "ไม่สามารถส่งออกรายชื่อผู้สอบผ่านได้!!"); + } + finally + { + if (System.IO.File.Exists(exportFile)) + System.IO.File.Delete(exportFile); + } + } + + [HttpGet("export/pass/{id:length(36)}")] + public async Task> ExportPassExamResultAsync(Guid id) + { + var data = await _context.RecruitImports.AsQueryable() + .Include(x => x.Recruits) + .FirstOrDefaultAsync(x => x.Id == id); + + var data_pass = await _context.RecruitImports.AsQueryable() + .Include(x => x.ScoreImport) + .ThenInclude(x => x.Scores) + .FirstOrDefaultAsync(x => x.Id == id); + + if (data == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + if (data_pass == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + var header = $"{data.Name} ครั้งที่ {data.Order}/{data.Year.ToThaiYear()}"; + + var template_dir = Path.Combine(_webHostEnvironment.ContentRootPath, "Templates"); + + var template_file = Path.Combine(template_dir, "PassExamList.xlsx"); + + var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp"); + if (!Directory.Exists(tmpDir)) + Directory.CreateDirectory(tmpDir); + + var exportFile = Path.Combine(tmpDir, $"PassExamList_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"); + + try + { + var result = (from r in data.Recruits.ToList() + join s in data_pass.ScoreImport.Scores.Where(x => x.ExamStatus == "ผ่าน").ToList() on r.ExamId equals s.ExamId + select new + { + r.ExamId, + r.CitizenId, + r.Prefix, + r.FirstName, + r.LastName, + Full = s.FullA + s.FullB + s.FullC, + Sum = s.SumA + s.SumB + s.SumC, + Status = s.ExamStatus, + r.PositionName, + s.Number + }).ToList(); + + // copy template + System.IO.File.Copy(template_file, exportFile); + + using (var excel = new ExcelPackage(new FileInfo(exportFile))) + { + var workSheet = excel.Workbook.Worksheets[0]; + + + workSheet.Cells[1, 2].Value = header; + var recruits = data.Recruits.OrderBy(x => x.ExamId).ToList(); + + var row = 4; // start at row 4 + foreach (var item in result) + { + workSheet.Cells[row, 1].Value = item.ExamId; + workSheet.Cells[row, 2].Value = item.CitizenId; + workSheet.Cells[row, 3].Value = $"{item.Prefix}{item.FirstName} {item.LastName}"; + workSheet.Cells[row, 4].Value = item.Full; + workSheet.Cells[row, 5].Value = item.Sum; + workSheet.Cells[row, 6].Value = item.Status; + workSheet.Cells[row, 7].Value = item.Number; + workSheet.Cells[row, 8].Value = item.PositionName; row++; } diff --git a/Migrations/20230425122046_Add Field Number to Score.Designer.cs b/Migrations/20230425122046_Add Field Number to Score.Designer.cs new file mode 100644 index 0000000..5e39546 --- /dev/null +++ b/Migrations/20230425122046_Add Field Number to Score.Designer.cs @@ -0,0 +1,1364 @@ +// +using System; +using BMA.EHR.Recruit.Service.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace BMA.EHR.Recruit.Service.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20230425122046_Add Field Number to Score")] + partial class AddFieldNumbertoScore + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("BMA.EHR.Recruit.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.Recruit.Service.Models.Recruits.Recruit", 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("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("PositionName") + .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("RecruitImportId") + .HasColumnType("char(36)"); + + 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.HasKey("Id"); + + b.HasIndex("RecruitImportId"); + + b.ToTable("Recruits"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitAddress", 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("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("RecruitId") + .HasColumnType("char(36)"); + + 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(5) + .HasColumnType("varchar(5)"); + + b.Property("ZipCode1") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitAddresses"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitCertificate", 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("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.Property("RecruitId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitDocument", 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("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.Property("RecruitId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentFileId"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitEducation", 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("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("RecruitId") + .HasColumnType("char(36)"); + + b.Property("Specialist") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("University") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AnnouncementDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(14) + .HasComment("วันที่ประกาศผลสอบ"); + + b.Property("AnnouncementEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(7) + .HasComment("วันสิ้นสุดประกาศ"); + + b.Property("AnnouncementStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(6) + .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("Detail") + .HasColumnType("text") + .HasColumnOrder(4) + .HasComment("รายละเอียด"); + + b.Property("ExamDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(12) + .HasComment("วันที่สอบ"); + + b.Property("Fee") + .HasColumnType("int") + .HasColumnOrder(5) + .HasComment("ค่าธรรมเนียม"); + + 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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(2) + .HasComment("รอบการสอบ"); + + b.Property("Note") + .HasColumnType("text") + .HasColumnOrder(13) + .HasComment("หมายเหตุ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(3) + .HasComment("ครั้งที่"); + + b.Property("PaymentEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(9) + .HasComment("วันสิ้นสุดชำระเงิน"); + + b.Property("PaymentStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(8) + .HasComment("วันเริ่มชำระเงิน"); + + b.Property("RegisterEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(11) + .HasComment("วันสิ้นสุดสมัครสอบ"); + + b.Property("RegisterStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(10) + .HasComment("วันเริ่มสมัครสอบ"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ปีงบประมาณที่จัดสอบ"); + + b.HasKey("Id"); + + b.HasIndex("ImportFileId"); + + b.ToTable("RecruitImports"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportHistory", 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("RecruitImportId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitImportId"); + + b.ToTable("RecruitImportHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitOccupation", 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("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("RecruitId") + .HasColumnType("char(36)"); + + 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("RecruitId"); + + b.ToTable("RecruitOccupations"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitPayment", 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("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("RecruitId") + .HasColumnType("char(36)"); + + 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("RecruitId"); + + b.ToTable("RecruitPayments"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitScore", 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)"); + + b.Property("AStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("BStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CStatus") + .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("ExamId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExamStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("FullA") + .HasColumnType("int"); + + b.Property("FullB") + .HasColumnType("int"); + + b.Property("FullC") + .HasColumnType("int"); + + 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"); + + b.Property("PercentageB") + .HasColumnType("double"); + + b.Property("PercentageC") + .HasColumnType("double"); + + b.Property("ScoreImportId") + .HasColumnType("char(36)"); + + b.Property("SumA") + .HasColumnType("int"); + + b.Property("SumAB") + .HasColumnType("int"); + + b.Property("SumB") + .HasColumnType("int"); + + b.Property("SumC") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ScoreImportId"); + + b.ToTable("RecruitScores"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.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("RecruitImportId") + .HasColumnType("char(36)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ImportFileId"); + + b.HasIndex("RecruitImportId") + .IsUnique(); + + b.ToTable("ScoreImports"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport") + .WithMany("Recruits") + .HasForeignKey("RecruitImportId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("RecruitImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitAddress", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Addresses") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitCertificate", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Certificates") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitDocument", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "DocumentFile") + .WithMany() + .HasForeignKey("DocumentFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Documents") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocumentFile"); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitEducation", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Educations") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ImportFile"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportHistory", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport") + .WithMany("ImportHostories") + .HasForeignKey("RecruitImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RecruitImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitOccupation", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Occupations") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitPayment", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Payments") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitScore", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", "ScoreImport") + .WithMany("Scores") + .HasForeignKey("ScoreImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ScoreImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport") + .WithOne("ScoreImport") + .HasForeignKey("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", "RecruitImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ImportFile"); + + b.Navigation("RecruitImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", b => + { + b.Navigation("Addresses"); + + b.Navigation("Certificates"); + + b.Navigation("Documents"); + + b.Navigation("Educations"); + + b.Navigation("Occupations"); + + b.Navigation("Payments"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", b => + { + b.Navigation("ImportHostories"); + + b.Navigation("Recruits"); + + b.Navigation("ScoreImport") + .IsRequired(); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", b => + { + b.Navigation("Scores"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20230425122046_Add Field Number to Score.cs b/Migrations/20230425122046_Add Field Number to Score.cs new file mode 100644 index 0000000..9162e26 --- /dev/null +++ b/Migrations/20230425122046_Add Field Number to Score.cs @@ -0,0 +1,32 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Recruit.Service.Migrations +{ + /// + public partial class AddFieldNumbertoScore : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Number", + table: "RecruitScores", + type: "varchar(200)", + maxLength: 200, + nullable: false, + defaultValue: "", + comment: "ลำดับที่สอบได้") + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Number", + table: "RecruitScores"); + } + } +} diff --git a/Migrations/20230425132757_Change Number Field.Designer.cs b/Migrations/20230425132757_Change Number Field.Designer.cs new file mode 100644 index 0000000..cd385c4 --- /dev/null +++ b/Migrations/20230425132757_Change Number Field.Designer.cs @@ -0,0 +1,1364 @@ +// +using System; +using BMA.EHR.Recruit.Service.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace BMA.EHR.Recruit.Service.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20230425132757_Change Number Field")] + partial class ChangeNumberField + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("BMA.EHR.Recruit.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.Recruit.Service.Models.Recruits.Recruit", 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("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("PositionName") + .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("RecruitImportId") + .HasColumnType("char(36)"); + + 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.HasKey("Id"); + + b.HasIndex("RecruitImportId"); + + b.ToTable("Recruits"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitAddress", 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("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("RecruitId") + .HasColumnType("char(36)"); + + 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(5) + .HasColumnType("varchar(5)"); + + b.Property("ZipCode1") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitAddresses"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitCertificate", 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("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.Property("RecruitId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitDocument", 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("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.Property("RecruitId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentFileId"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitEducation", 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("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("RecruitId") + .HasColumnType("char(36)"); + + b.Property("Specialist") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("University") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitId"); + + b.ToTable("RecruitEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AnnouncementDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(14) + .HasComment("วันที่ประกาศผลสอบ"); + + b.Property("AnnouncementEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(7) + .HasComment("วันสิ้นสุดประกาศ"); + + b.Property("AnnouncementStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(6) + .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("Detail") + .HasColumnType("text") + .HasColumnOrder(4) + .HasComment("รายละเอียด"); + + b.Property("ExamDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(12) + .HasComment("วันที่สอบ"); + + b.Property("Fee") + .HasColumnType("int") + .HasColumnOrder(5) + .HasComment("ค่าธรรมเนียม"); + + 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("Name") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("varchar(250)") + .HasColumnOrder(2) + .HasComment("รอบการสอบ"); + + b.Property("Note") + .HasColumnType("text") + .HasColumnOrder(13) + .HasComment("หมายเหตุ"); + + b.Property("Order") + .HasColumnType("int") + .HasColumnOrder(3) + .HasComment("ครั้งที่"); + + b.Property("PaymentEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(9) + .HasComment("วันสิ้นสุดชำระเงิน"); + + b.Property("PaymentStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(8) + .HasComment("วันเริ่มชำระเงิน"); + + b.Property("RegisterEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(11) + .HasComment("วันสิ้นสุดสมัครสอบ"); + + b.Property("RegisterStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(10) + .HasComment("วันเริ่มสมัครสอบ"); + + b.Property("Year") + .HasColumnType("int") + .HasColumnOrder(1) + .HasComment("ปีงบประมาณที่จัดสอบ"); + + b.HasKey("Id"); + + b.HasIndex("ImportFileId"); + + b.ToTable("RecruitImports"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportHistory", 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("RecruitImportId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RecruitImportId"); + + b.ToTable("RecruitImportHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitOccupation", 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("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("RecruitId") + .HasColumnType("char(36)"); + + 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("RecruitId"); + + b.ToTable("RecruitOccupations"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitPayment", 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("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("RecruitId") + .HasColumnType("char(36)"); + + 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("RecruitId"); + + b.ToTable("RecruitPayments"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitScore", 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)"); + + b.Property("AStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("BStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CStatus") + .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("ExamId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExamStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("FullA") + .HasColumnType("int"); + + b.Property("FullB") + .HasColumnType("int"); + + b.Property("FullC") + .HasColumnType("int"); + + 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"); + + b.Property("PercentageB") + .HasColumnType("double"); + + b.Property("PercentageC") + .HasColumnType("double"); + + b.Property("ScoreImportId") + .HasColumnType("char(36)"); + + b.Property("SumA") + .HasColumnType("int"); + + b.Property("SumAB") + .HasColumnType("int"); + + b.Property("SumB") + .HasColumnType("int"); + + b.Property("SumC") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ScoreImportId"); + + b.ToTable("RecruitScores"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.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("RecruitImportId") + .HasColumnType("char(36)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ImportFileId"); + + b.HasIndex("RecruitImportId") + .IsUnique(); + + b.ToTable("ScoreImports"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport") + .WithMany("Recruits") + .HasForeignKey("RecruitImportId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("RecruitImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitAddress", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Addresses") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitCertificate", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Certificates") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitDocument", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "DocumentFile") + .WithMany() + .HasForeignKey("DocumentFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Documents") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DocumentFile"); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitEducation", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Educations") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ImportFile"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportHistory", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport") + .WithMany("ImportHostories") + .HasForeignKey("RecruitImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RecruitImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitOccupation", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Occupations") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitPayment", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit") + .WithMany("Payments") + .HasForeignKey("RecruitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Recruit"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitScore", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", "ScoreImport") + .WithMany("Scores") + .HasForeignKey("ScoreImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ScoreImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", b => + { + b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport") + .WithOne("ScoreImport") + .HasForeignKey("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", "RecruitImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ImportFile"); + + b.Navigation("RecruitImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", b => + { + b.Navigation("Addresses"); + + b.Navigation("Certificates"); + + b.Navigation("Documents"); + + b.Navigation("Educations"); + + b.Navigation("Occupations"); + + b.Navigation("Payments"); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", b => + { + b.Navigation("ImportHostories"); + + b.Navigation("Recruits"); + + b.Navigation("ScoreImport") + .IsRequired(); + }); + + modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.ScoreImport", b => + { + b.Navigation("Scores"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20230425132757_Change Number Field.cs b/Migrations/20230425132757_Change Number Field.cs new file mode 100644 index 0000000..e50cf1c --- /dev/null +++ b/Migrations/20230425132757_Change Number Field.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Recruit.Service.Migrations +{ + /// + public partial class ChangeNumberField : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/Migrations/ApplicationDbContextModelSnapshot.cs b/Migrations/ApplicationDbContextModelSnapshot.cs index 7fb1226..e33a64a 100644 --- a/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1087,6 +1087,12 @@ namespace BMA.EHR.Recruit.Service.Migrations .HasMaxLength(200) .HasColumnType("varchar(200)"); + b.Property("Number") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("ลำดับที่สอบได้"); + b.Property("PercentageA") .HasColumnType("double"); diff --git a/Models/Recruits/RecruitScore.cs b/Models/Recruits/RecruitScore.cs index 71f84ab..56a5944 100644 --- a/Models/Recruits/RecruitScore.cs +++ b/Models/Recruits/RecruitScore.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; namespace BMA.EHR.Recruit.Service.Models.Recruits { @@ -45,6 +46,9 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits [MaxLength(200)] public string Major { get; set; } + [MaxLength(200),Comment("ลำดับที่สอบได้")] + public string Number { get; set; } = string.Empty; + public ScoreImport ScoreImport { get; set; } } } diff --git a/Program.cs b/Program.cs index b6c6c17..d5c2111 100644 --- a/Program.cs +++ b/Program.cs @@ -74,7 +74,7 @@ BsonSerializer.RegisterSerializer(new DateTimeSerializer(BsonType.String)); // Register DbContext var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection"); builder.Services.AddDbContext(options => - options.UseMySql(defaultConnection, ServerVersion.AutoDetect(defaultConnection))); + options.UseMySql(defaultConnection, ServerVersion.AutoDetect(defaultConnection)), ServiceLifetime.Transient); // Add config CORS builder.Services.AddCors(options => options.AddDefaultPolicy(builder => diff --git a/Services/RecruitService.cs b/Services/RecruitService.cs index 944c73a..88c6210 100644 --- a/Services/RecruitService.cs +++ b/Services/RecruitService.cs @@ -8,42 +8,58 @@ using BMA.EHR.Recruit.Service.Models.Recruits; namespace BMA.EHR.Recruit.Service.Services { - public class RecruitService - { - private readonly ApplicationDbContext _context; + public class RecruitService + { + private readonly ApplicationDbContext _context; - public RecruitService(ApplicationDbContext context) - { - _context = context; - } + public RecruitService(ApplicationDbContext context) + { + _context = context; + } - public async Task GetExamAttributeAsync(Guid period, Guid exam) - { - try - { - var payment = await _context.RecruitPayments.AsQueryable() - .Include(x => x.Recruit) - .ThenInclude(x => x.RecruitImport) - .Where(x => x.Recruit.Id == exam) - .Where(x => x.Recruit.RecruitImport.Id == period) - .FirstOrDefaultAsync(); + public int GetExamCount(string citizenId) + { + try + { + var count = _context.Recruits.AsQueryable() + .Where(x => x.CitizenId == citizenId) + .Count(); - return payment != null ? "มีคุณสมบัติ" : "ไม่มีคุณสมบัติ"; - } - catch - { - throw; - } - } + return count; + } + catch + { + throw; + } + } - public bool CheckValidCertificate(DateTime certDate, int nextYear = 5) - { - var valid = true; - if (DateTime.Now.Date > certDate.Date.AddYears(nextYear)) - valid = false; + public async Task GetExamAttributeAsync(Guid period, Guid exam) + { + try + { + var payment = await _context.RecruitPayments.AsQueryable() + .Include(x => x.Recruit) + .ThenInclude(x => x.RecruitImport) + .Where(x => x.Recruit.Id == exam) + .Where(x => x.Recruit.RecruitImport.Id == period) + .FirstOrDefaultAsync(); - return valid; - } + return payment != null ? "มีคุณสมบัติ" : "ไม่มีคุณสมบัติ"; + } + catch + { + throw; + } + } - } + public bool CheckValidCertificate(DateTime certDate, int nextYear = 5) + { + var valid = true; + if (DateTime.Now.Date > certDate.Date.AddYears(nextYear)) + valid = false; + + return valid; + } + + } } \ No newline at end of file diff --git a/Templates/PassExamList.xlsx b/Templates/PassExamList.xlsx new file mode 100644 index 0000000..ebcbf4e Binary files /dev/null and b/Templates/PassExamList.xlsx differ diff --git a/appsettings.Development.json b/appsettings.Development.json index 0872841..74aa044 100644 --- a/appsettings.Development.json +++ b/appsettings.Development.json @@ -14,7 +14,7 @@ "AllowedHosts": "*", "ConnectionStrings": { "MongoConnection": "mongodb://127.0.0.1:27017", - "DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + "DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" }, "Jwt": { "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", diff --git a/bin/Debug/net7.0/BMA.EHR.Recruit.Service.dll b/bin/Debug/net7.0/BMA.EHR.Recruit.Service.dll index d0dd45e..ed36f67 100644 Binary files a/bin/Debug/net7.0/BMA.EHR.Recruit.Service.dll and b/bin/Debug/net7.0/BMA.EHR.Recruit.Service.dll differ diff --git a/bin/Debug/net7.0/BMA.EHR.Recruit.Service.pdb b/bin/Debug/net7.0/BMA.EHR.Recruit.Service.pdb index 5d4d52c..3596781 100644 Binary files a/bin/Debug/net7.0/BMA.EHR.Recruit.Service.pdb and b/bin/Debug/net7.0/BMA.EHR.Recruit.Service.pdb differ diff --git a/bin/Debug/net7.0/BMA.EHR.Recruit.Service.xml b/bin/Debug/net7.0/BMA.EHR.Recruit.Service.xml index d1e610e..00f861d 100644 --- a/bin/Debug/net7.0/BMA.EHR.Recruit.Service.xml +++ b/bin/Debug/net7.0/BMA.EHR.Recruit.Service.xml @@ -305,6 +305,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + ตัวแปรสำหรับสร้างข้อมูลการสอบแข่งขัน diff --git a/bin/Debug/net7.0/appsettings.Development.json b/bin/Debug/net7.0/appsettings.Development.json index 0872841..74aa044 100644 --- a/bin/Debug/net7.0/appsettings.Development.json +++ b/bin/Debug/net7.0/appsettings.Development.json @@ -14,7 +14,7 @@ "AllowedHosts": "*", "ConnectionStrings": { "MongoConnection": "mongodb://127.0.0.1:27017", - "DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + "DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" }, "Jwt": { "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", diff --git a/obj/BMA.EHR.Recruit.Service.csproj.nuget.dgspec.json b/obj/BMA.EHR.Recruit.Service.csproj.nuget.dgspec.json index 58ad32b..fb8246d 100644 --- a/obj/BMA.EHR.Recruit.Service.csproj.nuget.dgspec.json +++ b/obj/BMA.EHR.Recruit.Service.csproj.nuget.dgspec.json @@ -17,6 +17,7 @@ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ + "D:\\Develop\\Source\\BMA-EHR\\BMA-EHR-Recruit-Service\\NuGet.Config", "C:\\Users\\suphonchai\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" @@ -25,9 +26,9 @@ "net7.0" ], "sources": { - "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "C:\\Program Files\\dotnet\\library-packs": {}, - "https://api.nuget.org/v3/index.json": {} + "https://api.nuget.org/v3/index.json": {}, + "https://nuget.frappet.synology.me/v3/index.json": {} }, "frameworks": { "net7.0": { diff --git a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.csproj.CoreCompileInputs.cache b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.csproj.CoreCompileInputs.cache index 8dca84a..4e037b6 100644 --- a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.csproj.CoreCompileInputs.cache +++ b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -b52ef2e214d5bf58c54319b97ef5fd93e089c214 +631488dd27a193436b4632d89171744e6c0deea1 diff --git a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.dll b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.dll index d0dd45e..ed36f67 100644 Binary files a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.dll and b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.dll differ diff --git a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.pdb b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.pdb index 5d4d52c..3596781 100644 Binary files a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.pdb and b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.pdb differ diff --git a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.xml b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.xml index d1e610e..00f861d 100644 --- a/obj/Debug/net7.0/BMA.EHR.Recruit.Service.xml +++ b/obj/Debug/net7.0/BMA.EHR.Recruit.Service.xml @@ -305,6 +305,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + ตัวแปรสำหรับสร้างข้อมูลการสอบแข่งขัน diff --git a/obj/Debug/net7.0/ref/BMA.EHR.Recruit.Service.dll b/obj/Debug/net7.0/ref/BMA.EHR.Recruit.Service.dll index 12a4a17..496a812 100644 Binary files a/obj/Debug/net7.0/ref/BMA.EHR.Recruit.Service.dll and b/obj/Debug/net7.0/ref/BMA.EHR.Recruit.Service.dll differ diff --git a/obj/Debug/net7.0/refint/BMA.EHR.Recruit.Service.dll b/obj/Debug/net7.0/refint/BMA.EHR.Recruit.Service.dll index 12a4a17..496a812 100644 Binary files a/obj/Debug/net7.0/refint/BMA.EHR.Recruit.Service.dll and b/obj/Debug/net7.0/refint/BMA.EHR.Recruit.Service.dll differ diff --git a/obj/Debug/net7.0/staticwebassets.build.json b/obj/Debug/net7.0/staticwebassets.build.json index 5b8e84a..c4fd389 100644 --- a/obj/Debug/net7.0/staticwebassets.build.json +++ b/obj/Debug/net7.0/staticwebassets.build.json @@ -1,6 +1,6 @@ { "Version": 1, - "Hash": "0zrvTC6mF/RXbeJJwEHxVjBPixlaFF5e2hnmdYRb0gI=", + "Hash": "76iOJYeekxJxm0hV7aRFaAuc1CIGFJZ2ZEHpsYqOoNc=", "Source": "BMA.EHR.Recruit.Service", "BasePath": "_content/BMA.EHR.Recruit.Service", "Mode": "Default", @@ -8,74 +8,6 @@ "ReferencedProjectsConfiguration": [], "DiscoveryPatterns": [], "Assets": [ - { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css", - "SourceId": "CoreAdmin", - "SourceType": "Package", - "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", - "BasePath": "_content/CoreAdmin", - "RelativePath": "css/bootstrap.css", - "AssetKind": "All", - "AssetMode": "All", - "AssetRole": "Primary", - "RelatedAsset": "", - "AssetTraitName": "", - "AssetTraitValue": "", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css" - }, - { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css.map", - "SourceId": "CoreAdmin", - "SourceType": "Package", - "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", - "BasePath": "_content/CoreAdmin", - "RelativePath": "css/bootstrap.css.map", - "AssetKind": "All", - "AssetMode": "All", - "AssetRole": "Primary", - "RelatedAsset": "", - "AssetTraitName": "", - "AssetTraitValue": "", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css.map" - }, - { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css", - "SourceId": "CoreAdmin", - "SourceType": "Package", - "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", - "BasePath": "_content/CoreAdmin", - "RelativePath": "css/bootstrap.min.css", - "AssetKind": "All", - "AssetMode": "All", - "AssetRole": "Primary", - "RelatedAsset": "", - "AssetTraitName": "", - "AssetTraitValue": "", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css" - }, - { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css.map", - "SourceId": "CoreAdmin", - "SourceType": "Package", - "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", - "BasePath": "_content/CoreAdmin", - "RelativePath": "css/bootstrap.min.css.map", - "AssetKind": "All", - "AssetMode": "All", - "AssetRole": "Primary", - "RelatedAsset": "", - "AssetTraitName": "", - "AssetTraitValue": "", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css.map" - }, { "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap-dark.css", "SourceId": "CoreAdmin", @@ -247,12 +179,12 @@ "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap-reboot.min.css.map" }, { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.css", + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css", "SourceId": "CoreAdmin", "SourceType": "Package", "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", "BasePath": "_content/CoreAdmin", - "RelativePath": "css/easymde/easymde.css", + "RelativePath": "css/bootstrap.css", "AssetKind": "All", "AssetMode": "All", "AssetRole": "Primary", @@ -261,15 +193,15 @@ "AssetTraitValue": "", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.css" + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css" }, { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.min.css", + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css.map", "SourceId": "CoreAdmin", "SourceType": "Package", "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", "BasePath": "_content/CoreAdmin", - "RelativePath": "css/easymde/easymde.min.css", + "RelativePath": "css/bootstrap.css.map", "AssetKind": "All", "AssetMode": "All", "AssetRole": "Primary", @@ -278,7 +210,41 @@ "AssetTraitValue": "", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.min.css" + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.css.map" + }, + { + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css", + "SourceId": "CoreAdmin", + "SourceType": "Package", + "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", + "BasePath": "_content/CoreAdmin", + "RelativePath": "css/bootstrap.min.css", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css" + }, + { + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css.map", + "SourceId": "CoreAdmin", + "SourceType": "Package", + "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", + "BasePath": "_content/CoreAdmin", + "RelativePath": "css/bootstrap.min.css.map", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\bootstrap.min.css.map" }, { "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde-dark.css", @@ -314,6 +280,40 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde-dark.min.css" }, + { + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.css", + "SourceId": "CoreAdmin", + "SourceType": "Package", + "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", + "BasePath": "_content/CoreAdmin", + "RelativePath": "css/easymde/easymde.css", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.css" + }, + { + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.min.css", + "SourceId": "CoreAdmin", + "SourceType": "Package", + "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", + "BasePath": "_content/CoreAdmin", + "RelativePath": "css/easymde/easymde.min.css", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\easymde\\easymde.min.css" + }, { "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\jquery-ui.min.css", "SourceId": "CoreAdmin", @@ -348,23 +348,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\mvc-grid\\fonts\\grid-glyphs.woff" }, - { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\mvc-grid\\mvc-grid.css", - "SourceId": "CoreAdmin", - "SourceType": "Package", - "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", - "BasePath": "_content/CoreAdmin", - "RelativePath": "css/mvc-grid/mvc-grid.css", - "AssetKind": "All", - "AssetMode": "All", - "AssetRole": "Primary", - "RelatedAsset": "", - "AssetTraitName": "", - "AssetTraitValue": "", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\mvc-grid\\mvc-grid.css" - }, { "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\mvc-grid\\mvc-grid-dark.css", "SourceId": "CoreAdmin", @@ -382,6 +365,23 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\mvc-grid\\mvc-grid-dark.css" }, + { + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\mvc-grid\\mvc-grid.css", + "SourceId": "CoreAdmin", + "SourceType": "Package", + "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", + "BasePath": "_content/CoreAdmin", + "RelativePath": "css/mvc-grid/mvc-grid.css", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\mvc-grid\\mvc-grid.css" + }, { "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\css\\site.css", "SourceId": "CoreAdmin", @@ -484,6 +484,23 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\easymde\\easymde.min.js" }, + { + "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\jquery-ui.min.js", + "SourceId": "CoreAdmin", + "SourceType": "Package", + "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", + "BasePath": "_content/CoreAdmin", + "RelativePath": "js/jquery-ui.min.js", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\jquery-ui.min.js" + }, { "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\jquery.js", "SourceId": "CoreAdmin", @@ -586,23 +603,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\jquery.validate.unobtrusive.min.js" }, - { - "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\jquery-ui.min.js", - "SourceId": "CoreAdmin", - "SourceType": "Package", - "ContentRoot": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\", - "BasePath": "_content/CoreAdmin", - "RelativePath": "js/jquery-ui.min.js", - "AssetKind": "All", - "AssetMode": "All", - "AssetRole": "Primary", - "RelatedAsset": "", - "AssetTraitName": "", - "AssetTraitValue": "", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\jquery-ui.min.js" - }, { "Identity": "C:\\Users\\suphonchai\\.nuget\\packages\\coreadmin\\2.7.0\\staticwebassets\\js\\mvc-grid\\mvc-grid.js", "SourceId": "CoreAdmin", diff --git a/obj/project.assets.json b/obj/project.assets.json index a67ee17..78acf75 100644 --- a/obj/project.assets.json +++ b/obj/project.assets.json @@ -13750,6 +13750,7 @@ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ + "D:\\Develop\\Source\\BMA-EHR\\BMA-EHR-Recruit-Service\\NuGet.Config", "C:\\Users\\suphonchai\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" @@ -13758,9 +13759,9 @@ "net7.0" ], "sources": { - "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "C:\\Program Files\\dotnet\\library-packs": {}, - "https://api.nuget.org/v3/index.json": {} + "https://api.nuget.org/v3/index.json": {}, + "https://nuget.frappet.synology.me/v3/index.json": {} }, "frameworks": { "net7.0": { diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache index 9936178..e0907a4 100644 --- a/obj/project.nuget.cache +++ b/obj/project.nuget.cache @@ -1,6 +1,6 @@ { "version": 2, - "dgSpecHash": "wwL7jfbtyqKoIC2sTXagCGqfHf4n51CJ6qkvce0iceTUavGY+JVtN++eF/274kGMddl63PkaB6O3QxxiNizXig==", + "dgSpecHash": "K/wHaGzbAUaPq8B/vVwHOicvFR4fG0bc6nAWP0hxR2oqH3U4E9d7DOJBjFRa1pU6Pn3p3PVyuCTht57bRl63yA==", "success": true, "projectFilePath": "D:\\Develop\\Source\\BMA-EHR\\BMA-EHR-Recruit-Service\\BMA.EHR.Recruit.Service.csproj", "expectedPackageFiles": [