diff --git a/Controllers/RecruitController.cs b/Controllers/RecruitController.cs
index 7b106be..ee2260c 100644
--- a/Controllers/RecruitController.cs
+++ b/Controllers/RecruitController.cs
@@ -386,6 +386,16 @@ namespace BMA.EHR.Recruit.Service.Controllers
Year = req.Year,
Name = req.Name,
Order = req.Order,
+ Detail = req.Detail,
+ Fee = req.Fee,
+ AnnouncementStartDate = req.AnnouncementStartDate,
+ AnnouncementEndDate = req.AnnouncementEndDate,
+ RegisterStartDate = req.RegisterStartDate,
+ RegisterEndDate = req.RegisterEndDate,
+ ExamDate = req.ExamDate,
+ PaymentStartDate = req.PaymentStartDate,
+ PaymentEndDate = req.PaymentEndDate,
+ Note = req.Note,
});
await _context.SaveChangesAsync();
@@ -398,6 +408,55 @@ namespace BMA.EHR.Recruit.Service.Controllers
}
}
+ ///
+ /// แก้ไขข้อมูลรอบการจัดสอบแข่งขัน
+ ///
+ /// รหัสรอบการสอบแข่งขัน
+ /// Request parameters
+ ///
+ /// เมื่อทำการเพิ่มข้อมูลสำเร็จ
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPut("period/{id:length(36)}")]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status400BadRequest)]
+ [ProducesResponseType(StatusCodes.Status401Unauthorized)]
+ [ProducesResponseType(StatusCodes.Status500InternalServerError)]
+ public async Task> PutPeriodAsync(Guid id, [FromBody] PostRecruitImportRequest req)
+ {
+ try
+ {
+ var data = await _context.RecruitImports.AsQueryable().FirstOrDefaultAsync(x => x.Id == id);
+
+ if (data == null)
+ return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
+
+ data.Name = req.Name;
+ data.Year = req.Year;
+ data.Order = req.Order;
+ data.Detail = req.Detail;
+ data.Fee = req.Fee;
+ data.AnnouncementEndDate = req.AnnouncementEndDate;
+ data.AnnouncementStartDate = req.AnnouncementStartDate;
+ data.RegisterStartDate = req.RegisterStartDate;
+ data.RegisterEndDate = req.RegisterEndDate;
+ data.PaymentEndDate = req.PaymentEndDate;
+ data.PaymentStartDate = req.PaymentStartDate;
+ data.ExamDate = req.ExamDate;
+ data.Note = req.Note;
+
+ await _context.SaveChangesAsync();
+
+ return Success();
+
+ }
+ catch (Exception ex)
+ {
+ return Error(ex);
+ }
+ }
+
///
/// ลบข้อมูลรอบการจัดสอบแข่งขัน
@@ -806,6 +865,223 @@ namespace BMA.EHR.Recruit.Service.Controllers
}
}
+
+ ///
+ /// นำเข้ารายชื่อผู้สมัครสอบแข่งขัน
+ ///
+ /// รหัสรอบการสอบแข่งขัน
+ ///
+ /// เมื่อทำนำเข้าข้อมูลสำเร็จ
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("candidate/{id:length(36)}"), DisableRequestSizeLimit]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status400BadRequest)]
+ [ProducesResponseType(StatusCodes.Status401Unauthorized)]
+ [ProducesResponseType(StatusCodes.Status500InternalServerError)]
+ public async Task> ImportCandidateFileByIdAsync(Guid id)
+ {
+ var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp");
+ if (!Directory.Exists(tmpDir))
+ Directory.CreateDirectory(tmpDir);
+
+ var importFile = Path.Combine(tmpDir, $"c_{DateTime.Now.ToString("ddMMyyyyHHmmss")}.xlsx");
+ var import_doc_id = "";
+
+ try
+ {
+ if (Request.Form.Files == null || Request.Form.Files.Count == 0)
+ {
+ return Error(GlobalMessages.NoFileToUpload);
+ }
+
+ var imported = await _context.RecruitImports.AsQueryable()
+ .Include(x => x.ImportHostories)
+ .Include(x => x.ImportFile)
+ .Include(x => x.Recruits)
+ .ThenInclude(x => x.Addresses)
+ .Include(x => x.Recruits)
+ .ThenInclude(x => x.Occupations)
+ .Include(x => x.Recruits)
+ .ThenInclude(x => x.Certificates)
+ .Include(x => x.Recruits)
+ .ThenInclude(x => x.Educations)
+ .Include(x => x.Recruits)
+ .ThenInclude(x => x.Payments)
+ .Include(x => x.Recruits)
+ .FirstOrDefaultAsync(x => x.Id == id);
+
+ if (imported == null)
+ return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
+
+ if (imported.Recruits != null)
+ {
+ // remove old score data
+ _context.Recruits.RemoveRange(imported.Recruits);
+ await _context.SaveChangesAsync();
+ }
+
+ var file = Request.Form.Files[0];
+ var doc = await _minioService.UploadFileAsync(file);
+ import_doc_id = doc.Id.ToString("D");
+
+ var fileContent = (await _minioService.DownloadFileAsync(doc.Id)).FileContent;
+
+ // สร้างรอบการบรรจุ โดยเอาเข้ามูลมาใส่จาก Request
+ imported.ImportHostories.Add(new RecruitImportHistory
+ {
+ Description = "นำเข้าข้อมูลผู้สมัครสอบแข่งขัน",
+ CreatedAt = DateTime.Now,
+ CreatedUserId = UserId ?? "",
+ CreatedFullName = FullName ?? "System Administrator",
+ });
+
+ //await _context.RecruitImports.AddAsync(imported);
+
+ // import datafile
+ System.IO.File.WriteAllBytes(importFile, fileContent);
+
+ using (var c_package = new ExcelPackage(new FileInfo(importFile)))
+ {
+ // loop from sheet2 to end
+
+ for (int i = 1; i < c_package.Workbook.Worksheets.Count; i++)
+ {
+ var workSheet = c_package.Workbook.Worksheets[i];
+ var totalRows = workSheet.Dimension.Rows;
+ var cols = workSheet.GetHeaderColumns();
+
+ int row = 2;
+
+ while (row <= totalRows)
+ {
+ var cell1 = workSheet?.Cells[row, 1]?.GetValue();
+ if (cell1 == "" || cell1 == null) break;
+
+ var r = new Models.Recruits.Recruit();
+ r.ExamId = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ExamID)]?.GetValue();
+ r.CitizenId = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PersonalID)]?.GetValue();
+ r.Prefix = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Prefix)]?.GetValue();
+ r.FirstName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.FirstName)]?.GetValue();
+ r.LastName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.LastName)]?.GetValue();
+ r.Gendor = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Gender)]?.GetValue();
+ r.National = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.National)]?.GetValue().IsNull("");
+ r.Race = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Race)]?.GetValue().IsNull("");
+ r.Religion = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Religion)]?.GetValue().IsNull("");
+ r.DateOfBirth = Convert.ToDateTime(workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.DateOfBirth)]?.GetValue().ToDateTime(DateTimeFormat.Ymd, "-"));
+ r.Marry = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Marry)]?.GetValue();
+ r.Isspecial = "N";
+ r.CitizenCardIssuer = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PersonalCardIssue)]?.GetValue();
+ r.CitizenCardExpireDate = Convert.ToDateTime(workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PersonalCardExpireDate)]?.GetValue().ToDateTime(DateTimeFormat.Ymd, "-"));
+ r.ApplyDate = (DateTime)workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ApplyDate)]?.GetValue();
+
+
+ // address
+ r.Addresses.Add(new RecruitAddress()
+ {
+ Address = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Address)]?.GetValue() ?? "",
+ Moo = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Moo)]?.GetValue() ?? "",
+ Soi = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Soi)]?.GetValue() ?? "",
+ Road = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Road)]?.GetValue() ?? "",
+ District = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.District)]?.GetValue() ?? "",
+ Amphur = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Amphur)]?.GetValue() ?? "",
+ Province = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Province)]?.GetValue() ?? "",
+ ZipCode = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ZipCode)]?.GetValue() ?? "",
+ Telephone = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Telephone)]?.GetValue() ?? "",
+ Mobile = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Mobile)]?.GetValue() ?? "",
+ Address1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Address1)]?.GetValue() ?? "",
+ Moo1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Moo1)]?.GetValue() ?? "",
+ Soi1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Soi1)]?.GetValue() ?? "",
+ Road1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Road1)]?.GetValue() ?? "",
+ District1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.District1)]?.GetValue() ?? "",
+ Amphur1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Amphur1)]?.GetValue() ?? "",
+ Province1 = "",
+ ZipCode1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ZipCode1)]?.GetValue() ?? "",
+ });
+
+ // payment
+ r.Payments.Add(new RecruitPayment()
+ {
+ PaymentId = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PaymentID)]?.GetValue() ?? "",
+ CompanyCode = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.CompanyCode)]?.GetValue() ?? "",
+ TextFile = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.TextFile)]?.GetValue() ?? "",
+ BankCode = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.BankCode)]?.GetValue() ?? "",
+ AccountNumber = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.AccouontNumer)]?.GetValue() ?? "",
+ TransDate = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.TransDate)]?.GetValue() ?? "",
+ TransTime = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.TransTime)]?.GetValue() ?? "",
+ CustomerName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.CustomerName)]?.GetValue() ?? "",
+ RefNo1 = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.RefNo1)]?.GetValue() ?? "",
+ TermBranch = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.TermBranch)]?.GetValue() ?? "",
+ TellerId = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.TellerID)]?.GetValue() ?? "",
+ CreditDebit = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.CreditDebit)]?.GetValue() ?? "",
+ PaymentType = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Type)]?.GetValue(),
+ ChequeNo = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ChequeNo)]?.GetValue() ?? "",
+ Amount = (decimal)workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Amount)]?.GetValue(),
+ ChqueBankCode = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ChqBankCode)]?.GetValue() ?? ""
+ });
+
+ // occupation
+ r.Occupations.Add(new RecruitOccupation()
+ {
+ Occupation = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Occupation)]?.GetValue() ?? "",
+ Position = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Position)]?.GetValue() ?? "",
+ Workplace = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Workplace)]?.GetValue() ?? "",
+ Telephone = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.WorkplaceTelephone)]?.GetValue() ?? "",
+ WorkAge = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.WorkAge)]?.GetValue() ?? "",
+ });
+
+ // certificate
+ r.Certificates.Add(new RecruitCertificate()
+ {
+ CertificateNo = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.CertificateNo)]?.GetValue() ?? "",
+ Description = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.CertificateDesc)]?.GetValue() ?? "",
+ IssueDate = Convert.ToDateTime(workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.CertificateIssueDate)]?.GetValue().ToDateTime(DateTimeFormat.Ymd, "-")),
+ ExpiredDate = Convert.ToDateTime(workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.CertificateExpireDate)]?.GetValue().ToDateTime(DateTimeFormat.Ymd, "-"))
+ });
+
+ r.Educations.Add(new RecruitEducation()
+ {
+ Degree = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Degree)]?.GetValue() ?? "",
+ Major = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.Major)]?.GetValue() ?? "",
+ MajorGroupId = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.MajorGroupID)]?.GetValue() ?? "",
+ MajorGroupName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.MajorGroupName)]?.GetValue() ?? "",
+ University = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.University)]?.GetValue() ?? "",
+ GPA = (double)workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.GPA)]?.GetValue(),
+ Specialist = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.SpecialList)]?.GetValue() ?? "",
+ HighDegree = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.HighDegree)]?.GetValue() ?? "",
+ BachelorDate = Convert.ToDateTime(workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.BachelorDate)]?.GetValue().ToDateTime(DateTimeFormat.Ymd, "-"))
+ });
+
+ r.RecruitImport = imported;
+ _context.Recruits.Add(r);
+
+ //imported.Recruits.Add(r);
+ row++;
+
+ }
+ }
+ }
+
+ // finally save to database
+
+ _context.SaveChanges();
+
+ return Success();
+
+ }
+ catch (Exception ex)
+ {
+ await _minioService.DeleteFileAsync(Guid.Parse(import_doc_id));
+ return Error(ex);
+ }
+ finally
+ {
+ if (System.IO.File.Exists(importFile))
+ System.IO.File.Delete(importFile);
+ }
+ }
+
#endregion
#region " Score File "
@@ -829,6 +1105,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
var rec_import = await _context.RecruitImports.AsQueryable()
.Include(x => x.ScoreImport)
+ .ThenInclude(x => x.Scores)
.Include(x => x.ImportHostories)
.FirstOrDefaultAsync(x => x.Id == id);
@@ -836,7 +1113,14 @@ namespace BMA.EHR.Recruit.Service.Controllers
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
if (rec_import.ScoreImport != null)
- return Error($"มีการนำเข้าข้อมูลเอาไว้ก่อนหน้านี้แล้ว ไม่สามารถนำเข้าได้!!");
+ {
+ // remove old score data
+ if (rec_import.ScoreImport.Scores != null)
+ {
+ _context.RecruitScores.RemoveRange(rec_import.ScoreImport.Scores);
+ await _context.SaveChangesAsync();
+ }
+ }
var file = Request.Form.Files[0];
var doc = await _minioService.UploadFileAsync(file);
@@ -916,6 +1200,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
}
catch (Exception ex)
{
+ await _minioService.DeleteFileAsync(Guid.Parse(import_doc_id));
return Error(ex);
}
finally
diff --git a/Migrations/20230423023735_Add Field to RecruitImport Table for Support CMS.Designer.cs b/Migrations/20230423023735_Add Field to RecruitImport Table for Support CMS.Designer.cs
new file mode 100644
index 0000000..afc0a74
--- /dev/null
+++ b/Migrations/20230423023735_Add Field to RecruitImport Table for Support CMS.Designer.cs
@@ -0,0 +1,1335 @@
+//
+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("20230423023735_Add Field to RecruitImport Table for Support CMS")]
+ partial class AddFieldtoRecruitImportTableforSupportCMS
+ {
+ ///
+ 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("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("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("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("PercentageA")
+ .HasColumnType("double");
+
+ b.Property("PercentageB")
+ .HasColumnType("double");
+
+ b.Property("PercentageC")
+ .HasColumnType("double");
+
+ b.Property("ScoreImportId")
+ .HasColumnType("char(36)");
+
+ b.Property