diff --git a/BMA.EHR.Recurit.Exam.Service.csproj b/BMA.EHR.Recurit.Exam.Service.csproj index eaab20c..4b65862 100644 --- a/BMA.EHR.Recurit.Exam.Service.csproj +++ b/BMA.EHR.Recurit.Exam.Service.csproj @@ -26,6 +26,7 @@ + @@ -55,6 +56,7 @@ + diff --git a/Controllers/BaseController.cs b/Controllers/BaseController.cs index 53be98b..9dda347 100644 --- a/Controllers/BaseController.cs +++ b/Controllers/BaseController.cs @@ -42,6 +42,17 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers return Success(GlobalMessages.Success, result); } + protected virtual ActionResult Error(string message, string result, int statusCode = StatusCodes.Status500InternalServerError) + { + return StatusCode((int)statusCode, new ResponseObject + { + Status = statusCode, + Message = message, + Result = result + }); + } + + protected virtual ActionResult Error(string message, int statusCode = StatusCodes.Status500InternalServerError) { return StatusCode((int)statusCode, new ResponseObject @@ -51,6 +62,19 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers }); } + protected virtual ActionResult Error(Exception exception, string message, int statusCode = StatusCodes.Status500InternalServerError) + { + var msg = exception.Message; + var inner = exception.InnerException; + while (inner != null) + { + msg += $" {inner.Message}\r\n"; + inner = inner.InnerException; + } + + return Error(message, msg, statusCode); + } + protected virtual ActionResult Error(Exception exception, int statusCode = StatusCodes.Status500InternalServerError) { var msg = exception.Message; diff --git a/Controllers/DisableController.cs b/Controllers/DisableController.cs new file mode 100644 index 0000000..ad1c8f7 --- /dev/null +++ b/Controllers/DisableController.cs @@ -0,0 +1,1819 @@ +using Amazon.S3.Model; +using BMA.EHR.Extensions; +using BMA.EHR.Recurit.Exam.Service.Controllers; +using BMA.EHR.Recurit.Exam.Service.Core; +using BMA.EHR.Recurit.Exam.Service.Data; +using BMA.EHR.Recurit.Exam.Service.Extensions; +using BMA.EHR.Recurit.Exam.Service.Models; +using BMA.EHR.Recurit.Exam.Service.Models.Disables; +using BMA.EHR.Recurit.Exam.Service.Request.Disables; +using BMA.EHR.Recurit.Exam.Service.Response; +using BMA.EHR.Recurit.Exam.Service.Responses; +using BMA.EHR.Recurit.Exam.Service.Services; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using MySqlConnector; +using OfficeOpenXml; +using Org.BouncyCastle.Ocsp; +using Sentry; +using Swashbuckle.AspNetCore.Annotations; +using System.Data; +using System.Net; +using System.Net.WebSockets; +using System.Security.Claims; +using System.Text; + +namespace BMA.EHR.Recurit.Exam.Service.Controllers +{ + [Route("api/v{version:apiVersion}/disable-exam")] + [ApiVersion("1.0")] + [ApiController] + [Produces("application/json")] + [Authorize] + [SwaggerTag("จัดการข้อมูลการสอบคัดเลือกคนพิการ")] + public class DisableController : BaseController + { + #region " Fields " + + private readonly ApplicationDbContext _context; + private readonly MinIOService _minioService; + private readonly IWebHostEnvironment _webHostEnvironment; + private readonly DisableService _disableService; + + private readonly IHttpContextAccessor _httpContextAccessor; + private readonly ILogger _logger; + + #endregion + + #region " Constructor and Destructor " + + public DisableController(ApplicationDbContext context, + MinIOService minioService, + IWebHostEnvironment webHostEnvironment, + DisableService disableService, + IHttpContextAccessor httpContextAccessor, + ILogger logger) + { + _context = context; + _minioService = minioService; + _webHostEnvironment = webHostEnvironment; + _disableService = disableService; + _httpContextAccessor = httpContextAccessor; + _logger = logger; + } + + #endregion + + #region " Properties " + + private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; + + private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; + + #endregion + + #region " Methods " + + #region " Private " + + private int GetColumnIndex(string[] columns, string name, bool partial = false) + { + try + { + if (partial) + return Array.FindIndex(columns, x => x.Contains(name)) + 1; + else + return Array.FindIndex(columns, x => x == name) + 1; + } + catch + { + return 0; + } + + } + + private string CalculateDiff(DateTime d1, DateTime d2) + { + if (d1 > d2) return "ข้อมูลไม่ถูกต้อง"; + + TimeSpan sp = d2.Subtract(d1); + int yy = sp.Days / 365; + int mm = (sp.Days - (yy * 365)) / 30; + int dd = (sp.Days - (yy * 365) - (mm * 30)); + + var sb = new StringBuilder(); + sb.Clear(); + sb.Append(yy == 0 ? "" : $"{yy} ปี "); + sb.Append(mm == 0 ? "" : $"{mm} เดือน "); + //sb.Append(dd == 0 ? "" : $"{dd} วัน "); + + return sb.ToString(); + } + + private async Task GetExamCount(Guid exam) + { + try + { + return await _context.DisablePayments.AsQueryable() + .Include(x => x.Disable) + .ThenInclude(x => x.PeriodExam) + .Where(x => x.Disable.PeriodExam.Id == exam) + .Where(x => x.Disable.PeriodExam.CheckDisability == true) + .CountAsync(); + } + catch + { + throw; + } + } + + private async Task GetPassExamCount(Guid exam) + { + try + { + return await _context.DisableScores.AsQueryable() + .Include(x => x.ScoreImport) + .Where(x => x.ScoreImport.Id == exam) + .Where(x => x.ExamStatus == "ผ่าน") + .CountAsync(); + } + catch + { + throw; + } + } + + private async Task GetScoreCount(Guid exam) + { + try + { + return await _context.DisableScores.AsQueryable() + .Include(x => x.ScoreImport) + .Where(x => x.ScoreImport.Id == exam) + .CountAsync(); + } + catch + { + throw; + } + } + + #endregion + + #region " Ex. Upload, Download and Delete file " + + /// + /// ตัวอย่างในการเขียน api เพื่อทำการ upload file + /// + /// + /// เมื่อทำการ upload สำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpPost("upload"), DisableRequestSizeLimit] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + [AllowAnonymous] + public async Task> UploadFile() + { + try + { + if (Request.Form.Files == null || Request.Form.Files.Count == 0) + { + return Error(GlobalMessages.NoFileToUpload); + } + + var file = Request.Form.Files[0]; + var doc = await _minioService.UploadFileAsync(file); + + return Success(doc); + } + catch (Exception ex) + { + return Error(ex); + } + } + + /// + /// ตัวอย่างในการเขียน api เพื่อทำการ delete file + /// + /// รหัสไฟล์ในฐานข้อมูล + /// + /// เมื่อทำการ delete file สำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpGet("delete/{id:length(36)}")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + [AllowAnonymous] + public async Task> DeleteFile(Guid id) + { + try + { + await _minioService.DeleteFileAsync(id); + + return Success(); + } + catch (Exception ex) + { + return Error(ex); + } + } + + /// + /// ตัวอย่างในการเขียน api เพื่อทำการ download file + /// + /// รหัสไฟล์ในฐานข้อมูล + /// + /// เมื่อทำการ download file สำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpGet("download/{id:length(36)}")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + [AllowAnonymous] + public async Task> DownloadFile(Guid id) + { + try + { + var file_data = await _minioService.DownloadFileAsync(id); + + Response.Headers["Content-Disposition"] = $"inline; filename={file_data.FileName}"; + + var ret = new FileContentResult(file_data.FileContent, file_data.FileType) + { + FileDownloadName = file_data.FileName + }; + + return ret; + } + catch (Exception ex) + { + return Error(ex); + } + } + + + #endregion + + #region " จัดการรอบการสมัครสอบคัดเลือกผู้พิการ " + + /// + /// แสดงข้อมูลรอบการสอบคัดเลือกผู้พิการ + /// + /// + /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpGet("period")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> GetPeriodsAsync() + { + try + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.ImportFile) + .Include(x => x.Disables) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.ImportFile) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.Scores) + .OrderByDescending(x => x.Year) + .ThenByDescending(x => x.Round) + .Select(x => new + { + x.Id, + x.Year, + x.Name, + x.Round, + ImportDate = x.CreatedAt.Date.ToThaiShortDate(), + ExamCount = x.Disables.Count(), + Score = x.ScoreImport == null ? null : + new + { + ID = x.ScoreImport.Id, + ImportYear = x.ScoreImport.Year, + ImportDate = x.CreatedAt.Date.ToThaiShortDate(), + ScoreCount = x.ScoreImport.Scores.Count(), + + } + }) + .ToListAsync(); + + return Success(data); + } + catch (Exception ex) + { + return Error(ex); + } + } + + /// + /// แสดงข้อมูลรอบการสอบคัดเลือกผู้พิการเป็นรายการ + /// + /// รหัสรอบการสอบคัดเลือกผู้พิการ + /// + /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpGet("period/{id:length(36)}")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> GetPeriodByIdAsync(Guid id) + { + try + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.ImportFile) + .Include(x => x.Disables) + .ThenInclude(x => x.Addresses) + .Include(x => x.Disables) + .ThenInclude(x => x.Occupations) + .Include(x => x.Disables) + .ThenInclude(x => x.Certificates) + .Include(x => x.Disables) + .ThenInclude(x => x.Educations) + .Include(x => x.Disables) + .ThenInclude(x => x.Payments) + .Include(x => x.Disables) + .ThenInclude(x => x.Documents) + .ThenInclude(x => x.DocumentFile) + .FirstOrDefaultAsync(x => x.Id == id); + + return Success(data); + } + catch (Exception ex) + { + return Error(ex); + } + } + + + /// + /// เพิ่มข้อมูลรอบการจัดสอบคัดเลือกผู้พิการ + /// + /// Request parameters + /// + /// เมื่อทำการเพิ่มข้อมูลสำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpPost("period")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> PostPeriodAsync([FromBody] PostDisableImportRequest req) + { + try + { + if (req == null) + return Error(GlobalMessages.InvalidRequestParam, (int)HttpStatusCode.BadRequest); + + await _context.PeriodExams.AddAsync(new PeriodExam + { + Year = req.Year, + Name = req.Name, + Round = req.Round, + 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, + AnnouncementDate = req.AnnouncementDate, + CheckDisability = true, + }); + + await _context.SaveChangesAsync(); + + return Success(); + } + catch (Exception ex) + { + return Error(ex); + } + } + + /// + /// แก้ไขข้อมูลรอบการจัดสอบคัดเลือกผู้พิการ + /// + /// รหัสรอบการสอบคัดเลือกผู้พิการ + /// 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] PostDisableImportRequest req) + { + try + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .FirstOrDefaultAsync(x => x.Id == id); + + if (data == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + data.Name = req.Name; + data.Year = req.Year; + data.Round = req.Round; + 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; + data.AnnouncementDate = req.AnnouncementDate; + + await _context.SaveChangesAsync(); + + return Success(); + + } + catch (Exception ex) + { + return Error(ex); + } + } + + + /// + /// ลบข้อมูลรอบการจัดสอบคัดเลือกผู้พิการ + /// + /// รหัสรอบการสอบคัดเลือกผู้พิการ + /// + /// เมื่อทำการลบข้อมูลสำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpDelete("period/{id:length(36)}")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> DeletePeriodAsync(Guid id) + { + try + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.ImportFile) + .Include(x => x.Disables) + .ThenInclude(x => x.Addresses) + .Include(x => x.Disables) + .ThenInclude(x => x.Occupations) + .Include(x => x.Disables) + .ThenInclude(x => x.Certificates) + .Include(x => x.Disables) + .ThenInclude(x => x.Educations) + .Include(x => x.Disables) + .ThenInclude(x => x.Payments) + .Include(x => x.Disables) + .ThenInclude(x => x.Documents) + .ThenInclude(x => x.DocumentFile) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.ImportFile) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.Scores) + .FirstOrDefaultAsync(x => x.Id == id); + + _context.PeriodExams.Remove(data); + await _context.SaveChangesAsync(); + + return Success(); + } + catch (Exception ex) + { + return Error(ex); + } + } + + #endregion + + #region " Candidate Files " + + /// + /// แสดงข้อมูลสำหรับหน้าจอ รายการนำเข้าข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ + /// + /// + /// เมื่อแสดงรายการข้อมูลสำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpGet("candidate")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> GetCandidateFilesAsync() + { + try + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.ImportFile) + .Include(x => x.Disables) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.ImportFile) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.Scores) + .OrderByDescending(x => x.Year) + .ThenByDescending(x => x.Round) + .Select(x => new + { + x.Id, + x.Year, + x.Name, + x.Round, + ImportDate = x.CreatedAt.Date.ToThaiShortDate(), + ExamCount = x.Disables.Count(), + Score = x.ScoreImport == null ? null : + new + { + ID = x.ScoreImport.Id, + ImportYear = x.ScoreImport.Year, + ImportDate = x.CreatedAt.Date.ToThaiShortDate(), + ScoreCount = x.ScoreImport.Scores.Count(), + + } + }) + .ToListAsync(); + + return Success(data); + } + catch (Exception ex) + { + return Error(ex); + } + } + + + /// + /// นำเข้ารายชื่อผู้สมัครสอบคัดเลือกผู้พิการ + /// + /// + /// เมื่อทำนำเข้าข้อมูลสำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpPost("candidate"), DisableRequestSizeLimit] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> ImportCandidateFileAsync([FromForm] PostDisableImportRequest req) + { + 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 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 + var imported = new PeriodExam + { + Year = req.Year, + Round = req.Round, + Name = req.Name, + ImportFile = doc, + CheckDisability = true, + CreatedAt = DateTime.Now, + CreatedUserId = UserId ?? "", + CreatedFullName = FullName ?? "System Administrator", + ImportHostories = new List + { + new DisableImportHistory + { + Description = "นำเข้าข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ", + CreatedAt = DateTime.Now, + CreatedUserId = UserId ?? "", + CreatedFullName = FullName ?? "System Administrator", + } + } + }; + + await _context.PeriodExams.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 Recurit.Exam.Service.Models.Disables.Disable(); + 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(); + r.PositionName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PositionName)]?.GetValue().IsNull(""); + + + // address + r.Addresses.Add(new DisableAddress() + { + 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 DisablePayment() + { + 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 DisableOccupation() + { + 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 DisableCertificate() + { + 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 DisableEducation() + { + 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.PeriodExam = imported; + _context.Disables.Add(r); + + //imported.Disables.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); + } + } + + /// + /// ลบข้อมูลนำข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ + /// + /// รหัสรอบการสอบคัดเลือกผู้พิการ + /// + /// เมื่อทำนำเข้าข้อมูลสำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpDelete("candidate/{id:length(36)}")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> DeleteCandidateFileAsync(Guid id) + { + try + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.ImportHostories) + .Include(x => x.ImportFile) + .Include(x => x.Disables) + .ThenInclude(x => x.Addresses) + .Include(x => x.Disables) + .ThenInclude(x => x.Occupations) + .Include(x => x.Disables) + .ThenInclude(x => x.Certificates) + .Include(x => x.Disables) + .ThenInclude(x => x.Educations) + .Include(x => x.Disables) + .ThenInclude(x => x.Payments) + .Include(x => x.Disables) + .ThenInclude(x => x.Documents) + .ThenInclude(x => x.DocumentFile) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.ImportFile) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.Scores) + .FirstOrDefaultAsync(x => x.Id == id); + + if (data == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + var rec_import_id = data.ImportFile.Id.ToString("D"); + var score_import_id = data.ScoreImport != null ? data.ScoreImport.ImportFile.Id.ToString("D") : "-"; + + _context.PeriodExams.Remove(data); + await _context.SaveChangesAsync(); + + // delete upload candidate file + await _minioService.DeleteFileAsync(Guid.Parse(rec_import_id)); + + // delete score file + if (score_import_id != "-") + await _minioService.DeleteFileAsync(Guid.Parse(score_import_id)); + + return Success(); + } + catch (Exception ex) + { + return Error(ex); + } + } + + /// + /// แสดงประวัติการนำเข้าข้อมูลการสอบคัดเลือกผู้พิการ + /// + /// รหัสรอบการสอบคัดเลือกผู้พิการ + /// + /// เมื่อทำนำเข้าข้อมูลสำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpGet("history/{id:length(36)}")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> GetImportHistoryAsync(Guid id) + { + try + { + var data = await _context.DisableImportHistories.AsQueryable() + .Include(x => x.PeriodExam) + .Where(x => x.PeriodExam.Id == id) + .Where(x => x.PeriodExam.CheckDisability == true) + .OrderByDescending(x => x.CreatedAt) + .ToListAsync(); + + return Success(data); + } + catch (Exception ex) + { + return Error(ex); + } + } + + + /// + /// นำเข้ารายชื่อผู้สมัครสอบคัดเลือกผู้พิการ + /// + /// รหัสรอบการสอบคัดเลือกผู้พิการ + /// + /// เมื่อทำนำเข้าข้อมูลสำเร็จ + /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง + /// ไม่ได้ 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.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.ImportHostories) + .Include(x => x.ImportFile) + .Include(x => x.Disables) + .ThenInclude(x => x.Addresses) + .Include(x => x.Disables) + .ThenInclude(x => x.Occupations) + .Include(x => x.Disables) + .ThenInclude(x => x.Certificates) + .Include(x => x.Disables) + .ThenInclude(x => x.Educations) + .Include(x => x.Disables) + .ThenInclude(x => x.Payments) + .Include(x => x.Disables) + .FirstOrDefaultAsync(x => x.Id == id); + + if (imported == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + if (imported.Disables != null) + { + // remove old score data + _context.Disables.RemoveRange(imported.Disables); + 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 DisableImportHistory + { + Description = "นำเข้าข้อมูลผู้สมัครสอบคัดเลือกผู้พิการ", + CreatedAt = DateTime.Now, + CreatedUserId = UserId ?? "", + CreatedFullName = FullName ?? "System Administrator", + }); + + //await _context.DisableImports.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 Recurit.Exam.Service.Models.Disables.Disable(); + 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(); + r.PositionName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PositionName)]?.GetValue().IsNull(""); + + // address + r.Addresses.Add(new DisableAddress() + { + 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 DisablePayment() + { + 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 DisableOccupation() + { + 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 DisableCertificate() + { + 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 DisableEducation() + { + 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.PeriodExam = imported; + _context.Disables.Add(r); + + //imported.Disables.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 " + + [HttpPost("score/{id:length(36)}"), DisableRequestSizeLimit] + public async Task> ImportScoreFileAsync(Guid id) + { + var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp"); + if (!Directory.Exists(tmpDir)) + Directory.CreateDirectory(tmpDir); + + var importFile = Path.Combine(tmpDir, $"s_{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 rec_import = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.ScoreImport) + .ThenInclude(x => x.Scores) + .Include(x => x.ImportHostories) + .FirstOrDefaultAsync(x => x.Id == id); + + if (rec_import == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + if (rec_import.ScoreImport != null) + { + // remove old score data + if (rec_import.ScoreImport.Scores != null) + { + _context.DisableScores.RemoveRange(rec_import.ScoreImport.Scores); + 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; + + // create import history + rec_import.ImportHostories.Add(new DisableImportHistory + { + Description = "นำเข้าข้อมูลผลคะแนนสอบ", + CreatedAt = DateTime.Now, + CreatedUserId = UserId ?? "", + CreatedFullName = FullName ?? "System Administrator", + }); + + // create new file import + var imported = new ScoreImport + { + Year = rec_import.Year, + ImportFile = doc, + Scores = new List() + }; + + // 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 = 8; + + while (row <= totalRows) + { + var cell1 = workSheet?.Cells[row, 1]?.GetValue(); + if (cell1 == "" || cell1 == null) break; + + var r = new DisableScore(); + r.ExamId = workSheet?.Cells[row, 2]?.GetValue(); + + r.FullA = (int)workSheet?.Cells[7, 7]?.GetValue().Replace("(", "").Replace(")", "").Replace("คะแนน", "").Trim().ToInteger(); + r.SumA = workSheet?.Cells[row, 7]?.GetValue() == "ขส." ? 0 : (int)workSheet?.Cells[row, 7]?.GetValue().Replace(".00", "").ToInteger(); + r.PercentageA = workSheet?.Cells[row, 8]?.GetValue() == "ขส." ? 0.0 : (double)workSheet?.Cells[row, 8]?.GetValue(); + r.AStatus = workSheet?.Cells[row, 9]?.GetValue(); + + r.FullB = (int)workSheet?.Cells[7, 12]?.GetValue().Replace("(", "").Replace(")", "").Replace("คะแนน", "").Trim().ToInteger(); + r.SumB = workSheet?.Cells[row, 12]?.GetValue() == "ขส." ? 0 : (int)workSheet?.Cells[row, 12]?.GetValue().Replace(".00", "").ToInteger(); + r.PercentageB = workSheet?.Cells[row, 13]?.GetValue() == "ขส." ? 0.0 : (double)workSheet?.Cells[row, 13]?.GetValue(); + r.BStatus = workSheet?.Cells[row, 14]?.GetValue(); + + r.SumAB = workSheet?.Cells[row, 15]?.GetValue() == "ขส." ? 0 : (int)workSheet?.Cells[row, 15]?.GetValue().Replace(".00", "").ToInteger(); + r.ABStatus = workSheet?.Cells[row, 17]?.GetValue(); + + r.FullC = (int)workSheet?.Cells[7, 20]?.GetValue().Replace("(", "").Replace(")", "").Replace("คะแนน", "").Trim().ToInteger(); + r.SumC = workSheet?.Cells[row, 20]?.GetValue() == "ขส." ? 0 : (int)workSheet?.Cells[row, 20]?.GetValue().Replace(".00", "").ToInteger(); + r.PercentageC = workSheet?.Cells[row, 21]?.GetValue() == "ขส." ? 0.0 : (double)workSheet?.Cells[row, 21]?.GetValue(); + 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; + + + imported.Scores.Add(r); + row++; + } + } + } + + // finally save to database + rec_import.ScoreImport = imported; + await _context.SaveChangesAsync(); + + 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 " Exam Information " + + /// + /// แสดงข้อมูลสำหรับหน้าจอ : รายการข้อมูลผู้สมัครสอบ + /// + [HttpGet("exam")] + public async Task> GetExamResultAsync() + { + try + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .OrderByDescending(x => x.Year) + .ThenByDescending(x => x.Round) + .Select(x => new + { + x.Id, + ExamYear = x.Year == null ? 0 : x.Year.Value.ToThaiYear(), + ExamOrder = x.Round, + Description = x.Name, + }) + .ToListAsync(); + + var result = new List(); + + foreach (var d in data) + { + result.Add(new + { + ExamYear = d.ExamYear, + Decription = d.Description, + ExamCount = await GetExamCount(d.Id), + PassCount = await GetPassExamCount(d.Id), + NotPassCount = (await GetExamCount(d.Id) - await GetPassExamCount(d.Id)) + }); + } + + return Success(result); + } + catch (Exception ex) + { + return Error(ex); + } + } + + [HttpPost("exam/{id:length(36)}")] + public ActionResult GetExamResultById([FromBody] DisableExamRequest req, Guid id) + { + try + { + var periodExam = _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .FirstOrDefault(x => x.Id == id); + + if (periodExam == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + var p_Id = new MySqlParameter("@id", id); + var data = new List(); + using (var cmd = _context.Database.GetDbConnection().CreateCommand()) + { + cmd.CommandTimeout = 0; + var sb = new StringBuilder(); + cmd.Parameters.Clear(); + sb.Clear(); + sb.Append(" SELECT * "); + sb.Append(" FROM exam_info "); + sb.Append(" WHERE disable_import_id = @id "); + cmd.Parameters.Add(p_Id); + + if (req.ExamAttribute != null && req.ExamAttribute != "") + { + sb.Append(" AND examAttribute = @a "); + cmd.Parameters.Add(new MySqlParameter("@a", req.ExamAttribute)); + } + + if (req.ExamResult != null && req.ExamResult != "") + { + sb.Append(" AND result = @r "); + cmd.Parameters.Add(new MySqlParameter("@r", req.ExamResult)); + } + + cmd.CommandText = sb.ToString(); + + _context.Database.OpenConnection(); + var da = new MySqlDataAdapter(cmd as MySqlCommand); + var dt = new DataTable(); + da.Fill(dt); + + foreach (DataRow dr in dt.Rows) + { + data.Add(new + { + examID = dr["examID"].ToString(), + profileID = dr["profileID"].ToString(), + prefix = dr["prefix"].ToString(), + fullName = dr["fullName"].ToString(), + dateOfBirth = dr["dateofbirth"] == null ? "" : Convert.ToDateTime(dr["dateofbirth"]).ToThaiShortDate(), + gender = dr["gender"].ToString(), + degree = dr["degree"].ToString(), + major = dr["major"].ToString(), + majorgroup = dr["majorgroup"].ToString(), + certificateNo = dr["certificateno"].ToString(), + certificateIssueDate = dr["certificateIssueDate"] == null ? "" : Convert.ToDateTime(dr["certificateIssueDate"]).ToThaiShortDate(), + ExamScore = dr["score"] == null ? 0 : dr["score"].ToString().ToInteger(), + ExamResult = dr["result"].ToString(), + ExamAttribute = dr["examAttribute"].ToString(), + Remark = dr["remark"].ToString(), + IsSpecial = dr["isspecial"].ToString(), + applyDate = dr["applydate"] == null ? "" : Convert.ToDateTime(dr["applydate"]).ToThaiShortDate(), + university = dr["university"].ToString(), + 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(), + }); + } + + } + + dynamic header = null; + using (var cmd = _context.Database.GetDbConnection().CreateCommand()) + { + var sb = new StringBuilder(); + cmd.CommandTimeout = 0; + cmd.Parameters.Clear(); + sb.Clear(); + sb.Append(" SELECT * "); + sb.Append(" FROM sum_exam_info "); + sb.Append(" WHERE disable_import_id = @id "); + cmd.Parameters.Add(p_Id); + + cmd.CommandText = sb.ToString(); + + + _context.Database.OpenConnection(); + MySqlDataAdapter da = new MySqlDataAdapter(cmd as MySqlCommand); + DataTable dt = new DataTable(); + da.Fill(dt); + if (dt.Rows.Count == 0) + { + header = new + { + count = 0, + pass = 0, + notpass = 0 + }; + } + else + { + var dr = dt.Rows[0]; + header = new + { + count = dr["count"].ToString().ToInteger(), + pass = dr["pass"].ToString().ToInteger(), + notpass = dr["notpass"].ToString().ToInteger() + }; + } + } + + return Success(new + { + data = data, + header = header, + round = periodExam.Round, + year = periodExam.Year + }); + } + catch (Exception ex) + { + return Error(ex); + } + } + + [HttpGet("exam/{id:length(36)}/{examId}")] + public async Task> GetExamResultByPersonAsync(Guid id, string examId) + { + try + { + var data = await _context.Disables.AsQueryable() + .Include(x => x.PeriodExam) + .Include(x => x.Documents) + .ThenInclude(x => x.DocumentFile) + .Where(x => x.PeriodExam.Id == id) + .Where(x => x.PeriodExam.CheckDisability == true) + .Where(x => x.ExamId == examId) + .Join(_context.DisableScores.AsQueryable() + .Include(x => x.ScoreImport), + rc => new { rc.PeriodExam.Year, rc.ExamId }, + sc => new { sc.ScoreImport.Year, sc.ExamId }, + (p, sr) => new + { + ExamID = p.ExamId, + ProfileID = p.CitizenId, + p.Prefix, + FullName = $"{p.FirstName} {p.LastName}", + DateOfBirth = p.DateOfBirth.ToThaiShortDate(), + Gender = p.Gendor, + Degree = p.Educations.First().Degree, + Major = p.Educations.First().Major, + CertificateNo = p.Certificates.First().CertificateNo, + CertificateIssueDate = p.Certificates.First().IssueDate.ToThaiShortDate(), + ExamResult = sr == null ? "" : sr.ExamStatus, + ExamAttribute = _disableService.CheckValidCertificate(p.Certificates.First().IssueDate, 5) ? "มีคุณสมบัติ" : "ไม่มีคุณสมบัติ", + IsSpecial = p.Isspecial, + Remark = p.Remark, + University = p.Educations.First().University, + PositionName = p.PositionName, + ExamName = p.PeriodExam.Name, + ExamOrder = p.PeriodExam.Round, + ExamYear = p.PeriodExam.Year == null ? 0 : p.PeriodExam.Year.Value.ToThaiYear(), + Score = sr == null ? 0 : sr.SumA + sr.SumB + sr.SumC, + Number = sr == null ? "" : sr.Number, + ExamCount = _disableService.GetExamCount(p.CitizenId), + ScoreExpire = p.PeriodExam.AnnouncementDate == null ? "" : p.PeriodExam.AnnouncementDate.AddYears(2).ToThaiShortDate(), + ScoreResult = sr == null ? null : new + { + ScoreAFull = sr.FullA, + ScoreA = sr.SumA, + ScoreBFull = sr.FullB, + ScoreB = sr.SumB, + ScoreCFull = sr.FullC, + ScoreC = sr.SumC, + ScoreSumFull = sr.FullA + sr.FullB + sr.FullC, + ScoreSum = sr.SumA + sr.SumB + sr.SumC, + ExamResult = sr.ExamStatus + }, + Attachments = p.Documents.Select(a => new + { + FileName = a.DocumentFile.FileName, + DocumentId = a.DocumentFile.Id + }) + }) + .FirstOrDefaultAsync(); + + return Success(data); + } + catch (Exception ex) + { + return Error(ex); + } + } + + #endregion + + #region " For CMS " + + [HttpGet("competitive")] + [AllowAnonymous] + public IActionResult GetPeriodForCMS() + { + try + { + var periods = _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Select(r => new + { + id = r.Id, + title = $"{r.Name} ครั้งที่ {r.Round}/{r.Year.Value.ToThaiYear()}", + category = "สำนักงาน ก.ก.", + category_id = 1, + announcement_startDate = r.AnnouncementStartDate == null ? "" : r.AnnouncementStartDate.ToString("yyyy-mm-dd"), + announcement_endDate = r.AnnouncementEndDate == null ? "" : r.AnnouncementEndDate.ToString("yyyy-MM-dd"), + announcementExam = true, + register_startDate = r.RegisterStartDate == null ? "" : r.RegisterStartDate.ToString("yyyy-MM-dd"), + register_endDate = r.RegisterEndDate == null ? "" : r.RegisterEndDate.ToString("yyyy-MM-dd"), + payment_startDate = r.PaymentStartDate == null ? "" : r.PaymentStartDate.ToString("yyyy-MM-dd"), + payment_endDate = r.PaymentEndDate == null ? "" : r.PaymentEndDate.ToString("yyyy-MM-dd"), + exam_date = r.ExamDate == null ? "" : r.ExamDate.ToString("yyyy-MM-dd") + + }) + .ToList(); + + return Ok(periods); + } + catch (Exception ex) + { + return StatusCode(500, ex.Message); + } + } + + #endregion + + #region " Export Excel " + + [HttpGet("export/exam/{id:length(36)}")] + public async Task> ExportExamAsync(Guid id) + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.Disables) + .FirstOrDefaultAsync(x => x.Id == id); + + if (data == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + var header = $"{data.Name} ครั้งที่ {data.Round}/{data.Year.Value.ToThaiYear()}"; + + var template_dir = Path.Combine(_webHostEnvironment.ContentRootPath, "Templates"); + + var template_file = Path.Combine(template_dir, "ExamList.xlsx"); + + var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp"); + if (!Directory.Exists(tmpDir)) + Directory.CreateDirectory(tmpDir); + + var exportFile = Path.Combine(tmpDir, $"ExamList_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"); + try + { + // 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 disables = data.Disables.OrderBy(x => x.ExamId).ToList(); + + var row = 4; // start at row 4 + foreach (var item in disables) + { + 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.PositionName; + + 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-exam/{id:length(36)}")] + public async Task> ExportPassExamAsync(Guid id) + { + var data = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.Disables) + .FirstOrDefaultAsync(x => x.Id == id); + + var data_pass = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .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.Round}/{data.Year.Value.ToThaiYear()}"; + + var template_dir = Path.Combine(_webHostEnvironment.ContentRootPath, "Templates"); + + var template_file = Path.Combine(template_dir, "PassAExamList.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.Disables.ToList() + join s in data_pass.ScoreImport.Scores.Where(x => x.AStatus == "ผ่าน").ToList() on r.ExamId equals s.ExamId + select new + { + r.ExamId, + r.CitizenId, + r.Prefix, + r.FirstName, + r.LastName, + s.FullA, + s.SumA, + s.AStatus, + + }).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 disables = data.Disables.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.FullA; + workSheet.Cells[row, 5].Value = item.SumA; + 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.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .Include(x => x.Disables) + .FirstOrDefaultAsync(x => x.Id == id); + + var data_pass = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == true) + .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.Round}/{data.Year.Value.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.Disables.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 disables = data.Disables.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++; + } + + 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); + } + } + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/Controllers/PeriodExamController.cs b/Controllers/PeriodExamController.cs index 9ff61a1..7802a5e 100644 --- a/Controllers/PeriodExamController.cs +++ b/Controllers/PeriodExamController.cs @@ -670,6 +670,34 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers } } + /// + /// โหลดผู้สมัครสอบ(รายละเอียด) + /// + /// รหัสรอบสมัคร + /// + /// เมื่อทำการอ่านโหลดผู้สมัครสอบ(รายละเอียด)สำเร็จ + /// ไม่ได้ Login เข้าระบบ + /// เมื่อเกิดข้อผิดพลาดในการทำงาน + [HttpGet("download/detail/{examId:length(36)}")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public async Task> DownloadCandidateAllAsync(string examId) + { + try + { + var stream = await _periodExamService.DownloadCandidateAllAsync(examId); + + string excelName = $"Candidate_{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.xlsx"; + return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", excelName); + // return Success(); + } + catch (Exception ex) + { + return Error(ex); + } + } + /// /// ข้อมูลตำแหน่งสมัครสอบ /// รหัสรอบสมัคร diff --git a/Core/GlobalMessages.cs b/Core/GlobalMessages.cs index c67c8df..9e512c4 100644 --- a/Core/GlobalMessages.cs +++ b/Core/GlobalMessages.cs @@ -3,6 +3,7 @@ public class GlobalMessages { public const string Success = "Success"; + public const string DataNotFound = "ไม่พบข้อมูลในระบบ"; public const string FileNotFoundOnServer = "ไม่พบไฟล์ในระบบ!!"; public const string CannotInsertToDatabase = "ไม่สามารถบันทึกลงฐานข้อมูลได้!!"; public const string InvalidRequestParam = "Request parameter ไม่ถูกต้อง!!"; diff --git a/Data/ApplicationDbContext.cs b/Data/ApplicationDbContext.cs index dda6300..479e369 100644 --- a/Data/ApplicationDbContext.cs +++ b/Data/ApplicationDbContext.cs @@ -1,4 +1,5 @@ using BMA.EHR.Recurit.Exam.Service.Models; +using BMA.EHR.Recurit.Exam.Service.Models.Disables; using BMA.EHR.Recurit.Exam.Service.Models.Documents; using Microsoft.EntityFrameworkCore; @@ -13,6 +14,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Data protected override void OnModelCreating(ModelBuilder modelBuilder) { + // disable relation setup + modelBuilder.Entity().HasMany(x => x.Disables).WithOne(x => x.PeriodExam).OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity().HasMany(x => x.Educations).WithOne(x => x.Disable).OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity().HasMany(x => x.Occupations).WithOne(x => x.Disable).OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity().HasMany(x => x.Addresses).WithOne(x => x.Disable).OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity().HasMany(x => x.Certificates).WithOne(x => x.Disable).OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity().HasMany(x => x.Payments).WithOne(x => x.Disable).OnDelete(DeleteBehavior.Cascade); } // public DbSet Prefixes { get; set; } @@ -55,5 +63,25 @@ namespace BMA.EHR.Recurit.Exam.Service.Data public DbSet CMSGovernments { get; set; } + public DbSet Disables { get; set; } + + public DbSet DisableAddresses { get; set; } + + public DbSet DisableOccupations { get; set; } + + public DbSet DisableCertificates { get; set; } + + public DbSet DisableEducations { get; set; } + + public DbSet ScoreImports { get; set; } + + public DbSet DisableScores { get; set; } + + public DbSet DisablePayments { get; set; } + + public DbSet DisableDocuments { get; set; } + + public DbSet DisableImportHistories { get; set; } + } } diff --git a/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/Data/Migrations/ApplicationDbContextModelSnapshot.cs index 8c87867..d7899de 100644 --- a/Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Data/Migrations/ApplicationDbContextModelSnapshot.cs @@ -572,6 +572,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations .HasColumnOrder(3) .HasComment("สัญชาติ"); + b.Property("Number") + .HasColumnType("longtext") + .HasComment("ลำดับที่สอบได้"); + b.Property("OccupationCompany") .HasColumnType("longtext") .HasComment("สำนัก/บริษัท บริษัท"); @@ -681,11 +685,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations b.Property("RelationshipId") .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); + .HasComment("Id สถานภาพ"); b.Property("RelationshipName") .HasColumnType("longtext") - .HasComment("ศาสนา"); + .HasComment("สถานภาพ"); b.Property("ResultB") .HasColumnType("longtext") @@ -882,6 +886,1014 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations b.ToTable("Careers"); }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ApplyDate") + .HasColumnType("datetime(6)"); + + b.Property("CitizenCardExpireDate") + .HasColumnType("datetime(6)"); + + b.Property("CitizenCardIssuer") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DateOfBirth") + .HasColumnType("datetime(6)"); + + b.Property("ExamId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("Gendor") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Isspecial") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("varchar(1)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Marry") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("National") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("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("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("PeriodExamId"); + + b.ToTable("Disables"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableAddress", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Address1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Amphur") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Amphur1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("District") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("District1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Mobile") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Moo") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Moo1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Province1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Road") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Road1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Soi") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Soi1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Telephone") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("ZipCode1") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableAddresses"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("ExpiredDate") + .HasColumnType("datetime(6)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("DocumentFileId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.HasIndex("DocumentFileId"); + + b.ToTable("DisableDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BachelorDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("GPA") + .HasColumnType("double"); + + b.Property("HighDegree") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("MajorGroupId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("MajorGroupName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Specialist") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("University") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableImportHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .HasComment("รายละเอียดการนำเข้า"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("DisableImportHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableOccupation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Occupation") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Telephone") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("WorkAge") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Workplace") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableOccupations"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisablePayment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AccountNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Amount") + .HasColumnType("decimal(65,30)"); + + b.Property("BankCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ChequeNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ChqueBankCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CompanyCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CreditDebit") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CustomerName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PaymentId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("RefNo1") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TellerId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TermBranch") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TextFile") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TransDate") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TransTime") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisablePayments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableScore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ABStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + 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("DisableScores"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("ImportFileId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ImportFileId"); + + b.HasIndex("PeriodExamId") + .IsUnique(); + + b.ToTable("ScoreImports"); + }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", b => { b.Property("Id") @@ -1080,6 +2092,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations .HasColumnType("float") .HasComment("ค่าธรรมเนียม"); + b.Property("ImportFileId") + .HasColumnType("char(36)"); + b.Property("IsActive") .HasColumnType("tinyint(1)") .HasComment("สถานะการใช้งาน"); @@ -1169,6 +2184,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations b.HasKey("Id"); + b.HasIndex("ImportFileId"); + b.ToTable("PeriodExams"); }); @@ -1476,6 +2493,131 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations b.Navigation("Candidate"); }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("Disables") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableAddress", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Addresses") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableCertificate", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Certificates") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableDocument", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Documents") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "DocumentFile") + .WithMany() + .HasForeignKey("DocumentFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + + b.Navigation("DocumentFile"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableEducation", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Educations") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableImportHistory", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("ImportHostories") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableOccupation", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Occupations") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisablePayment", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Payments") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableScore", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", "ScoreImport") + .WithMany("Scores") + .HasForeignKey("ScoreImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ScoreImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithOne("ScoreImport") + .HasForeignKey("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", "PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ImportFile"); + + b.Navigation("PeriodExam"); + }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b => { b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") @@ -1487,6 +2629,15 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations b.Navigation("Candidate"); }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId"); + + b.Navigation("ImportFile"); + }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamDocument", b => { b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") @@ -1543,17 +2694,43 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations b.Navigation("CMSGovernments"); }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => + { + b.Navigation("Addresses"); + + b.Navigation("Certificates"); + + b.Navigation("Documents"); + + b.Navigation("Educations"); + + b.Navigation("Occupations"); + + b.Navigation("Payments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => + { + b.Navigation("Scores"); + }); + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => { b.Navigation("BankExam"); b.Navigation("Candidate"); + b.Navigation("Disables"); + + b.Navigation("ImportHostories"); + b.Navigation("PeriodExamDocuments"); b.Navigation("PeriodExamImages"); b.Navigation("PositionExam"); + + b.Navigation("ScoreImport"); }); #pragma warning restore 612, 618 } diff --git a/Extensions/ExcelWorksheetExtension.cs b/Extensions/ExcelWorksheetExtension.cs new file mode 100644 index 0000000..40ac5fc --- /dev/null +++ b/Extensions/ExcelWorksheetExtension.cs @@ -0,0 +1,19 @@ +using OfficeOpenXml; +using System; +using System.Collections.Generic; + +namespace BMA.EHR.Recurit.Exam.Service.Extensions +{ + public static class ExcelWorksheetExtension + { + public static string[] GetHeaderColumns(this ExcelWorksheet sheet, int row = 1) + { + List columnNames = new List(); + foreach (var firstRowCell in sheet.Cells[row, sheet.Dimension.Start.Column, 1, sheet.Dimension.End.Column]) + columnNames.Add(firstRowCell.Text); + return columnNames.ToArray(); + } + + + } +} diff --git a/Migrations/20230428110529_update table candidate add number.Designer.cs b/Migrations/20230428110529_update table candidate add number.Designer.cs new file mode 100644 index 0000000..e80b6e4 --- /dev/null +++ b/Migrations/20230428110529_update table candidate add number.Designer.cs @@ -0,0 +1,1568 @@ +// +using System; +using BMA.EHR.Recurit.Exam.Service.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace BMA.EHR.Recurit.Exam.Service.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20230428110529_update table candidate add number")] + partial class updatetablecandidateaddnumber + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.BankExam", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AccountName") + .HasColumnType("longtext") + .HasComment("ชื่อบัญชี"); + + b.Property("AccountNumber") + .HasColumnType("longtext") + .HasComment("เลขบัญชี"); + + b.Property("BankName") + .HasColumnType("longtext") + .HasComment("ธนาคาร"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("BankExams"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSAgency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CMSCandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Link") + .HasColumnType("longtext") + .HasComment("ลิงค์"); + + b.Property("Name") + .HasColumnType("longtext") + .HasComment("ชื่อลิงค์"); + + b.HasKey("Id"); + + b.HasIndex("CMSCandidateId"); + + b.ToTable("CMSAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("About") + .HasColumnType("longtext") + .HasComment("ข้อมูลเกี่ยวกับเรา"); + + b.Property("Address") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("BannerImgId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Description") + .HasColumnType("longtext") + .HasComment("ข้อมูลเว็บโดยย่อ"); + + b.Property("DistrictId") + .HasColumnType("char(36)") + .HasComment("Id อำเภอ"); + + b.Property("DistrictName") + .HasColumnType("longtext") + .HasComment("อำเภอ"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("LogoImgId") + .HasColumnType("char(36)"); + + b.Property("NameEn") + .HasColumnType("longtext") + .HasComment("ชื่อเว็บภาษาอังกฤษ"); + + b.Property("NameTh") + .HasColumnType("longtext") + .HasComment("ชื่อเว็บภาษาไทย"); + + b.Property("ProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัด"); + + b.Property("ProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัด"); + + b.Property("ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อ"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id ตำบล"); + + b.Property("SubDistrictName") + .HasColumnType("longtext") + .HasComment("ตำบล"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์"); + + b.Property("ZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("BannerImgId"); + + b.HasIndex("LogoImgId"); + + b.ToTable("CMSCandidates"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSGovernment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CMSCandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Link") + .HasColumnType("longtext") + .HasComment("ลิงค์"); + + b.Property("Name") + .HasColumnType("longtext") + .HasComment("ชื่อลิงค์"); + + b.HasKey("Id"); + + b.HasIndex("CMSCandidateId"); + + b.ToTable("CMSGovernments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตที่ออกบัตรประชาชน"); + + b.Property("CitizenDistrictName") + .HasColumnType("longtext") + .HasComment("เขตที่ออกบัตรประชาชน"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); + + b.Property("CitizenProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัดที่ออกบัตรประชาชน"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictName") + .HasColumnType("longtext") + .HasComment("อำเภอที่อยู่ปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); + + b.Property("CurrentProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัดที่อยู่ปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); + + b.Property("CurrentSubDistrictName") + .HasColumnType("longtext") + .HasComment("ตำบลที่อยู่ปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamIdenNumber") + .HasColumnType("longtext") + .HasComment("เลขประจำตัวสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อบิดา"); + + b.Property("FatherPrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อบิดา"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อจริง"); + + b.Property("Knowledge") + .HasColumnType("longtext") + .HasComment("ความสามารถพิเศษ"); + + b.Property("LastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("นามสกุล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อคู่สมรส"); + + b.Property("MarryPrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อคู่สมรส"); + + b.Property("MobilePhone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อมารดา"); + + b.Property("MotherPrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อมารดา"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(3) + .HasComment("สัญชาติ"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("ลำดับที่สอบได้"); + + b.Property("OccupationCompany") + .HasColumnType("longtext") + .HasComment("สำนัก/บริษัท บริษัท"); + + b.Property("OccupationDepartment") + .HasColumnType("longtext") + .HasComment("กอง/ฝ่าย บริษัท"); + + b.Property("OccupationEmail") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล บริษัท"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งอาชีพ"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OccupationType") + .HasColumnType("longtext") + .HasComment("ประเภทอาชีพที่ทำงานมาก่อน"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PaymentImgId") + .HasColumnType("char(36)"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("PointB") + .HasColumnType("longtext") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("longtext") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalB") + .HasColumnType("longtext") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("longtext") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PositionExamId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อ"); + + b.Property("PrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อ"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)") + .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictName") + .HasColumnType("longtext") + .HasComment("อำเภอที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัดที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictName") + .HasColumnType("longtext") + .HasComment("ตำบลที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectDetail") + .HasColumnType("longtext") + .HasComment("เหตุผลการไม่อนุมัติ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id ศาสนา"); + + b.Property("RelationshipName") + .HasColumnType("longtext") + .HasComment("ศาสนา"); + + b.Property("ResultB") + .HasColumnType("longtext") + .HasComment("ผลสอบภาค ข"); + + b.Property("ResultC") + .HasColumnType("longtext") + .HasComment("ผลสอบภาค ค"); + + b.Property("SeatNumber") + .HasColumnType("longtext") + .HasComment("เลขที่นั่งสอบ"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("สถานะผู้สมัคร"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์"); + + b.Property("UserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("User Id ผู้สมัคร"); + + b.HasKey("Id"); + + b.HasIndex("PaymentImgId"); + + b.HasIndex("PeriodExamId"); + + b.HasIndex("PositionExamId"); + + b.HasIndex("ProfileImgId"); + + b.ToTable("Candidates"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CandidateDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.HasKey("Id"); + + b.HasIndex("CandidateId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CandidateDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DurationEnd") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("ระยะเวลาสิ้นสุด"); + + b.Property("DurationStart") + .HasColumnType("datetime(6)") + .HasColumnOrder(1) + .HasComment("ระยะเวลาเริ่ม"); + + b.Property("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() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("สถานที่ทำงาน/ฝึกงาน"); + + b.Property("Position") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("ตำแหน่ง/ลักษณะงาน"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("เหตุผลที่ออก"); + + b.Property("Salary") + .HasMaxLength(20) + .HasColumnType("int") + .HasColumnOrder(5) + .HasComment("เงินเดือนสุดท้ายก่อนออก"); + + b.HasKey("Id"); + + b.HasIndex("CandidateId"); + + b.ToTable("Careers"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Detail") + .IsRequired() + .HasColumnType("text"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("FileSize") + .HasColumnType("int"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ObjectRefId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("Documents"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DurationEnd") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("ระยะเวลาสิ้นสุด"); + + b.Property("DurationStart") + .HasColumnType("datetime(6)") + .HasColumnOrder(1) + .HasComment("ระยะเวลาเริ่ม"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Idวุฒิที่ได้รับ"); + + b.Property("EducationLevelName") + .HasColumnType("longtext") + .HasComment("วุฒิที่ได้รับ"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Major") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("สาขาวิชา/วิชาเอก"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("ชื่อสถานศึกษา"); + + b.Property("Scores") + .HasMaxLength(10) + .HasColumnType("float") + .HasColumnOrder(6) + .HasComment("คะแนนเฉลี่ยตลอดหลักสูตร"); + + b.HasKey("Id"); + + b.HasIndex("CandidateId"); + + b.ToTable("Educations"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AnnouncementDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(5) + .HasComment("วันประกาศผลสอบ"); + + b.Property("AnnouncementEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(7) + .HasComment("วันสิ้นสุดประกาศ"); + + b.Property("AnnouncementExam") + .HasColumnType("tinyint(1)") + .HasComment("ประกาศนี้มีสมัครสอบคัดเลือก"); + + b.Property("AnnouncementStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(6) + .HasComment("วันเริ่มประกาศ"); + + b.Property("Category") + .HasColumnType("longtext") + .HasComment("สำนัก"); + + b.Property("CheckDisability") + .HasColumnType("tinyint(1)") + .HasComment("คนพิการ"); + + b.Property("CheckDocument") + .HasColumnType("tinyint(1)") + .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("longtext") + .HasComment("รายละเอียดสมัครสอบ"); + + b.Property("ExamDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สอบ"); + + b.Property("Fee") + .HasColumnType("float") + .HasComment("ค่าธรรมเนียม"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(8) + .HasComment("ชื่อการสอบ"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("OrganizationCodeId") + .HasColumnType("char(36)") + .HasComment("Id รหัสส่วนราชการ"); + + b.Property("OrganizationCodeName") + .HasColumnType("longtext") + .HasComment("ชื่อรหัสส่วนราชการ"); + + b.Property("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงาน"); + + b.Property("OrganizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("PaymentEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(4) + .HasComment("วันสิ้นสุดชำระเงิน"); + + b.Property("PaymentKrungThai") + .HasColumnType("longtext") + .HasComment("ชำระเงินผ่านกรุงไทย"); + + b.Property("PaymentStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันเริ่มชำระเงิน"); + + b.Property("RegisterEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันสิ้นสุดสมัครสอบ"); + + b.Property("RegisterStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(1) + .HasComment("วันเริ่มสมัครสอบ"); + + b.Property("Round") + .HasColumnType("int") + .HasColumnOrder(9) + .HasComment("รอบการสอบ"); + + b.Property("SetSeat") + .HasColumnType("tinyint(1)") + .HasComment("เช็คอัพคะแนน"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.ToTable("PeriodExams"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("PeriodExamDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamImage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("PeriodExamImages"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", 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("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("TypeId") + .HasColumnType("longtext") + .HasComment("Id ประเภทแบบฟอร์ม"); + + b.Property("TypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทแบบฟอร์ม"); + + b.HasKey("Id"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("PositionExams"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.BankExam", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("BankExam") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSAgency", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", "CMSCandidate") + .WithMany("CMSAgencys") + .HasForeignKey("CMSCandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CMSCandidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "BannerImg") + .WithMany() + .HasForeignKey("BannerImgId"); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "LogoImg") + .WithMany() + .HasForeignKey("LogoImgId"); + + b.Navigation("BannerImg"); + + b.Navigation("LogoImg"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSGovernment", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", "CMSCandidate") + .WithMany("CMSGovernments") + .HasForeignKey("CMSCandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CMSCandidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "PaymentImg") + .WithMany() + .HasForeignKey("PaymentImgId"); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("Candidate") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", "PositionExam") + .WithMany() + .HasForeignKey("PositionExamId"); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.Navigation("PaymentImg"); + + b.Navigation("PeriodExam"); + + b.Navigation("PositionExam"); + + b.Navigation("ProfileImg"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CandidateDocument", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") + .WithMany() + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") + .WithMany() + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") + .WithMany() + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamDocument", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("PeriodExamDocuments") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamImage", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("PeriodExamImages") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("PositionExam") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => + { + b.Navigation("CMSAgencys"); + + b.Navigation("CMSGovernments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => + { + b.Navigation("BankExam"); + + b.Navigation("Candidate"); + + b.Navigation("PeriodExamDocuments"); + + b.Navigation("PeriodExamImages"); + + b.Navigation("PositionExam"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20230428110529_update table candidate add number.cs b/Migrations/20230428110529_update table candidate add number.cs new file mode 100644 index 0000000..0b407e5 --- /dev/null +++ b/Migrations/20230428110529_update table candidate add number.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Recurit.Exam.Service.Migrations +{ + /// + public partial class updatetablecandidateaddnumber : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Number", + table: "Candidates", + type: "longtext", + nullable: true, + comment: "ลำดับที่สอบได้") + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Number", + table: "Candidates"); + } + } +} diff --git a/Migrations/20230428220613_create table add disable.Designer.cs b/Migrations/20230428220613_create table add disable.Designer.cs new file mode 100644 index 0000000..fb601fc --- /dev/null +++ b/Migrations/20230428220613_create table add disable.Designer.cs @@ -0,0 +1,2741 @@ +// +using System; +using BMA.EHR.Recurit.Exam.Service.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace BMA.EHR.Recurit.Exam.Service.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20230428220613_create table add disable")] + partial class createtableadddisable + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.BankExam", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AccountName") + .HasColumnType("longtext") + .HasComment("ชื่อบัญชี"); + + b.Property("AccountNumber") + .HasColumnType("longtext") + .HasComment("เลขบัญชี"); + + b.Property("BankName") + .HasColumnType("longtext") + .HasComment("ธนาคาร"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("BankExams"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSAgency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CMSCandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Link") + .HasColumnType("longtext") + .HasComment("ลิงค์"); + + b.Property("Name") + .HasColumnType("longtext") + .HasComment("ชื่อลิงค์"); + + b.HasKey("Id"); + + b.HasIndex("CMSCandidateId"); + + b.ToTable("CMSAgencys"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("About") + .HasColumnType("longtext") + .HasComment("ข้อมูลเกี่ยวกับเรา"); + + b.Property("Address") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("BannerImgId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Description") + .HasColumnType("longtext") + .HasComment("ข้อมูลเว็บโดยย่อ"); + + b.Property("DistrictId") + .HasColumnType("char(36)") + .HasComment("Id อำเภอ"); + + b.Property("DistrictName") + .HasColumnType("longtext") + .HasComment("อำเภอ"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("LogoImgId") + .HasColumnType("char(36)"); + + b.Property("NameEn") + .HasColumnType("longtext") + .HasComment("ชื่อเว็บภาษาอังกฤษ"); + + b.Property("NameTh") + .HasColumnType("longtext") + .HasComment("ชื่อเว็บภาษาไทย"); + + b.Property("ProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัด"); + + b.Property("ProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัด"); + + b.Property("ShortName") + .HasColumnType("longtext") + .HasComment("ชื่อย่อ"); + + b.Property("SubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id ตำบล"); + + b.Property("SubDistrictName") + .HasColumnType("longtext") + .HasComment("ตำบล"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์"); + + b.Property("ZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์"); + + b.HasKey("Id"); + + b.HasIndex("BannerImgId"); + + b.HasIndex("LogoImgId"); + + b.ToTable("CMSCandidates"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSGovernment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CMSCandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Link") + .HasColumnType("longtext") + .HasComment("ลิงค์"); + + b.Property("Name") + .HasColumnType("longtext") + .HasComment("ชื่อลิงค์"); + + b.HasKey("Id"); + + b.HasIndex("CMSCandidateId"); + + b.ToTable("CMSGovernments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CitizenDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่ออกบัตร"); + + b.Property("CitizenDistrictId") + .HasColumnType("char(36)") + .HasComment("Id เขตที่ออกบัตรประชาชน"); + + b.Property("CitizenDistrictName") + .HasColumnType("longtext") + .HasComment("เขตที่ออกบัตรประชาชน"); + + b.Property("CitizenId") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CitizenProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); + + b.Property("CitizenProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัดที่ออกบัตรประชาชน"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CurrentAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictId") + .HasColumnType("char(36)") + .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); + + b.Property("CurrentDistrictName") + .HasColumnType("longtext") + .HasComment("อำเภอที่อยู่ปัจจุบัน"); + + b.Property("CurrentProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); + + b.Property("CurrentProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัดที่อยู่ปัจจุบัน"); + + b.Property("CurrentSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); + + b.Property("CurrentSubDistrictName") + .HasColumnType("longtext") + .HasComment("ตำบลที่อยู่ปัจจุบัน"); + + b.Property("CurrentZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); + + b.Property("DateOfBirth") + .HasMaxLength(40) + .HasColumnType("datetime(6)") + .HasComment("วันเกิด"); + + b.Property("Email") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล"); + + b.Property("ExamIdenNumber") + .HasColumnType("longtext") + .HasComment("เลขประจำตัวสอบ"); + + b.Property("FatherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงบิดา"); + + b.Property("FatherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลบิดา"); + + b.Property("FatherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติบิดา"); + + b.Property("FatherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพบิดา"); + + b.Property("FatherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อบิดา"); + + b.Property("FatherPrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อบิดา"); + + b.Property("FirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(1) + .HasComment("ชื่อจริง"); + + b.Property("Knowledge") + .HasColumnType("longtext") + .HasComment("ความสามารถพิเศษ"); + + b.Property("LastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnOrder(2) + .HasComment("นามสกุล"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Marry") + .HasColumnType("tinyint(1)") + .HasComment("คู่สมรส"); + + b.Property("MarryFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงคู่สมรส"); + + b.Property("MarryLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลคู่สมรส"); + + b.Property("MarryNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติคู่สมรส"); + + b.Property("MarryOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพคู่สมรส"); + + b.Property("MarryPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อคู่สมรส"); + + b.Property("MarryPrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อคู่สมรส"); + + b.Property("MobilePhone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์มือถือ"); + + b.Property("MotherFirstName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("ชื่อจริงมารดา"); + + b.Property("MotherLastName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("นามสกุลมารดา"); + + b.Property("MotherNationality") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasComment("สัญชาติมารดา"); + + b.Property("MotherOccupation") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อาชีพมารดา"); + + b.Property("MotherPrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อมารดา"); + + b.Property("MotherPrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อมารดา"); + + b.Property("Nationality") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(3) + .HasComment("สัญชาติ"); + + b.Property("Number") + .HasColumnType("longtext") + .HasComment("ลำดับที่สอบได้"); + + b.Property("OccupationCompany") + .HasColumnType("longtext") + .HasComment("สำนัก/บริษัท บริษัท"); + + b.Property("OccupationDepartment") + .HasColumnType("longtext") + .HasComment("กอง/ฝ่าย บริษัท"); + + b.Property("OccupationEmail") + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasComment("อีเมล บริษัท"); + + b.Property("OccupationPosition") + .HasColumnType("longtext") + .HasComment("ตำแหน่งอาชีพ"); + + b.Property("OccupationTelephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์ บริษัท"); + + b.Property("OccupationType") + .HasColumnType("longtext") + .HasComment("ประเภทอาชีพที่ทำงานมาก่อน"); + + b.Property("Pass") + .HasColumnType("longtext") + .HasComment("ผลสมัครสอบ"); + + b.Property("PaymentImgId") + .HasColumnType("char(36)"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("PointB") + .HasColumnType("longtext") + .HasComment("คะแนนภาค ข"); + + b.Property("PointC") + .HasColumnType("longtext") + .HasComment("คะแนนภาค ค"); + + b.Property("PointTotalB") + .HasColumnType("longtext") + .HasComment("คะแนนเต็มภาค ข"); + + b.Property("PointTotalC") + .HasColumnType("longtext") + .HasComment("คะแนนเต็มภาค ค"); + + b.Property("PositionExamId") + .HasColumnType("char(36)"); + + b.Property("PrefixId") + .HasColumnType("char(36)") + .HasComment("Id คำนำหน้าชื่อ"); + + b.Property("PrefixName") + .HasColumnType("longtext") + .HasComment("คำนำหน้าชื่อ"); + + b.Property("ProfileImgId") + .HasColumnType("char(36)"); + + b.Property("RegistAddress") + .HasColumnType("longtext") + .HasComment("ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictId") + .HasColumnType("char(36)") + .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistDistrictName") + .HasColumnType("longtext") + .HasComment("อำเภอที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistProvinceId") + .HasColumnType("char(36)") + .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistProvinceName") + .HasColumnType("longtext") + .HasComment("จังหวัดที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSame") + .HasColumnType("tinyint(1)") + .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictId") + .HasColumnType("char(36)") + .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistSubDistrictName") + .HasColumnType("longtext") + .HasComment("ตำบลที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RegistZipCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); + + b.Property("RejectDetail") + .HasColumnType("longtext") + .HasComment("เหตุผลการไม่อนุมัติ"); + + b.Property("RelationshipId") + .HasColumnType("char(36)") + .HasComment("Id สถานภาพ"); + + b.Property("RelationshipName") + .HasColumnType("longtext") + .HasComment("สถานภาพ"); + + b.Property("ResultB") + .HasColumnType("longtext") + .HasComment("ผลสอบภาค ข"); + + b.Property("ResultC") + .HasColumnType("longtext") + .HasComment("ผลสอบภาค ค"); + + b.Property("SeatNumber") + .HasColumnType("longtext") + .HasComment("เลขที่นั่งสอบ"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("สถานะผู้สมัคร"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("โทรศัพท์"); + + b.Property("UserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("User Id ผู้สมัคร"); + + b.HasKey("Id"); + + b.HasIndex("PaymentImgId"); + + b.HasIndex("PeriodExamId"); + + b.HasIndex("PositionExamId"); + + b.HasIndex("ProfileImgId"); + + b.ToTable("Candidates"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CandidateDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.HasKey("Id"); + + b.HasIndex("CandidateId"); + + b.HasIndex("DocumentId"); + + b.ToTable("CandidateDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DurationEnd") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("ระยะเวลาสิ้นสุด"); + + b.Property("DurationStart") + .HasColumnType("datetime(6)") + .HasColumnOrder(1) + .HasComment("ระยะเวลาเริ่ม"); + + b.Property("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() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("สถานที่ทำงาน/ฝึกงาน"); + + b.Property("Position") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("ตำแหน่ง/ลักษณะงาน"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(6) + .HasComment("เหตุผลที่ออก"); + + b.Property("Salary") + .HasMaxLength(20) + .HasColumnType("int") + .HasColumnOrder(5) + .HasComment("เงินเดือนสุดท้ายก่อนออก"); + + b.HasKey("Id"); + + b.HasIndex("CandidateId"); + + b.ToTable("Careers"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ApplyDate") + .HasColumnType("datetime(6)"); + + b.Property("CitizenCardExpireDate") + .HasColumnType("datetime(6)"); + + b.Property("CitizenCardIssuer") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CitizenId") + .IsRequired() + .HasMaxLength(13) + .HasColumnType("varchar(13)") + .HasComment("เลขประจำตัวประชาชน"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DateOfBirth") + .HasColumnType("datetime(6)"); + + b.Property("ExamId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("Gendor") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Isspecial") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("varchar(1)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Marry") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("National") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("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("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("PeriodExamId"); + + b.ToTable("Disables"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableAddress", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Address1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Amphur") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Amphur1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("District") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("District1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Mobile") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Moo") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Moo1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Province1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Road") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Road1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Soi") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Soi1") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Telephone") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ZipCode") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.Property("ZipCode1") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("varchar(5)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableAddresses"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("ExpiredDate") + .HasColumnType("datetime(6)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableCertificates"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("DocumentFileId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.HasIndex("DocumentFileId"); + + b.ToTable("DisableDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableEducation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("BachelorDate") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("GPA") + .HasColumnType("double"); + + b.Property("HighDegree") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("MajorGroupId") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("MajorGroupName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Specialist") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("University") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableEducations"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableImportHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(1) + .HasComment("รายละเอียดการนำเข้า"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("DisableImportHistories"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableOccupation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Occupation") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Telephone") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("WorkAge") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Workplace") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisableOccupations"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisablePayment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AccountNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Amount") + .HasColumnType("decimal(65,30)"); + + b.Property("BankCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ChequeNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ChqueBankCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CompanyCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("CreditDebit") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CustomerName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("DisableId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PaymentId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("RefNo1") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TellerId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TermBranch") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TextFile") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TransDate") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TransTime") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("DisableId"); + + b.ToTable("DisablePayments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableScore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("ABStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + 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("DisableScores"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("ImportFileId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ImportFileId"); + + b.HasIndex("PeriodExamId") + .IsUnique(); + + b.ToTable("ScoreImports"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Detail") + .IsRequired() + .HasColumnType("text"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("FileSize") + .HasColumnType("int"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ObjectRefId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("Documents"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CandidateId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DurationEnd") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("ระยะเวลาสิ้นสุด"); + + b.Property("DurationStart") + .HasColumnType("datetime(6)") + .HasColumnOrder(1) + .HasComment("ระยะเวลาเริ่ม"); + + b.Property("EducationLevelId") + .HasColumnType("char(36)") + .HasComment("Idวุฒิที่ได้รับ"); + + b.Property("EducationLevelName") + .HasColumnType("longtext") + .HasComment("วุฒิที่ได้รับ"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Major") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(4) + .HasComment("สาขาวิชา/วิชาเอก"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext") + .HasColumnOrder(3) + .HasComment("ชื่อสถานศึกษา"); + + b.Property("Scores") + .HasMaxLength(10) + .HasColumnType("float") + .HasColumnOrder(6) + .HasComment("คะแนนเฉลี่ยตลอดหลักสูตร"); + + b.HasKey("Id"); + + b.HasIndex("CandidateId"); + + b.ToTable("Educations"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AnnouncementDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(5) + .HasComment("วันประกาศผลสอบ"); + + b.Property("AnnouncementEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(7) + .HasComment("วันสิ้นสุดประกาศ"); + + b.Property("AnnouncementExam") + .HasColumnType("tinyint(1)") + .HasComment("ประกาศนี้มีสมัครสอบคัดเลือก"); + + b.Property("AnnouncementStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(6) + .HasComment("วันเริ่มประกาศ"); + + b.Property("Category") + .HasColumnType("longtext") + .HasComment("สำนัก"); + + b.Property("CheckDisability") + .HasColumnType("tinyint(1)") + .HasComment("คนพิการ"); + + b.Property("CheckDocument") + .HasColumnType("tinyint(1)") + .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("longtext") + .HasComment("รายละเอียดสมัครสอบ"); + + b.Property("ExamDate") + .HasColumnType("datetime(6)") + .HasComment("วันที่สอบ"); + + b.Property("Fee") + .HasColumnType("float") + .HasComment("ค่าธรรมเนียม"); + + b.Property("ImportFileId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasComment("สถานะการใช้งาน"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)") + .HasColumnOrder(8) + .HasComment("ชื่อการสอบ"); + + b.Property("Note") + .HasColumnType("longtext") + .HasComment("หมายเหตุ"); + + b.Property("OrganizationCodeId") + .HasColumnType("char(36)") + .HasComment("Id รหัสส่วนราชการ"); + + b.Property("OrganizationCodeName") + .HasColumnType("longtext") + .HasComment("ชื่อรหัสส่วนราชการ"); + + b.Property("OrganizationId") + .HasColumnType("char(36)") + .HasComment("Id หน่วยงาน"); + + b.Property("OrganizationName") + .HasColumnType("longtext") + .HasComment("ชื่อหน่วยงาน"); + + b.Property("PaymentEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(4) + .HasComment("วันสิ้นสุดชำระเงิน"); + + b.Property("PaymentKrungThai") + .HasColumnType("longtext") + .HasComment("ชำระเงินผ่านกรุงไทย"); + + b.Property("PaymentStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(3) + .HasComment("วันเริ่มชำระเงิน"); + + b.Property("RegisterEndDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(2) + .HasComment("วันสิ้นสุดสมัครสอบ"); + + b.Property("RegisterStartDate") + .HasColumnType("datetime(6)") + .HasColumnOrder(1) + .HasComment("วันเริ่มสมัครสอบ"); + + b.Property("Round") + .HasColumnType("int") + .HasColumnOrder(9) + .HasComment("รอบการสอบ"); + + b.Property("SetSeat") + .HasColumnType("tinyint(1)") + .HasComment("เช็คอัพคะแนน"); + + b.Property("Year") + .HasColumnType("int") + .HasComment("ปีงบประมาณ"); + + b.HasKey("Id"); + + b.HasIndex("ImportFileId"); + + b.ToTable("PeriodExams"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("PeriodExamDocuments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamImage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)") + .HasColumnOrder(0) + .HasComment("PrimaryKey") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(100) + .HasComment("สร้างข้อมูลเมื่อ"); + + b.Property("CreatedFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(104) + .HasComment("ชื่อ User ที่สร้างข้อมูล"); + + b.Property("CreatedUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(101) + .HasComment("User Id ที่สร้างข้อมูล"); + + b.Property("DocumentId") + .HasColumnType("char(36)"); + + b.Property("LastUpdateFullName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)") + .HasColumnOrder(105) + .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdateUserId") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnOrder(103) + .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); + + b.Property("LastUpdatedAt") + .HasColumnType("datetime(6)") + .HasColumnOrder(102) + .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); + + b.Property("PeriodExamId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("PeriodExamImages"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", 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("PeriodExamId") + .HasColumnType("char(36)"); + + b.Property("PositionId") + .HasColumnType("char(36)") + .HasComment("Id ตำแหน่ง"); + + b.Property("PositionName") + .HasColumnType("longtext") + .HasComment("ชื่อตำแหน่ง"); + + b.Property("TypeId") + .HasColumnType("longtext") + .HasComment("Id ประเภทแบบฟอร์ม"); + + b.Property("TypeName") + .HasColumnType("longtext") + .HasComment("ชื่อประเภทแบบฟอร์ม"); + + b.HasKey("Id"); + + b.HasIndex("PeriodExamId"); + + b.ToTable("PositionExams"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.BankExam", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("BankExam") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSAgency", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", "CMSCandidate") + .WithMany("CMSAgencys") + .HasForeignKey("CMSCandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CMSCandidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "BannerImg") + .WithMany() + .HasForeignKey("BannerImgId"); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "LogoImg") + .WithMany() + .HasForeignKey("LogoImgId"); + + b.Navigation("BannerImg"); + + b.Navigation("LogoImg"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSGovernment", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", "CMSCandidate") + .WithMany("CMSGovernments") + .HasForeignKey("CMSCandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CMSCandidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "PaymentImg") + .WithMany() + .HasForeignKey("PaymentImgId"); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("Candidate") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", "PositionExam") + .WithMany() + .HasForeignKey("PositionExamId"); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ProfileImg") + .WithMany() + .HasForeignKey("ProfileImgId"); + + b.Navigation("PaymentImg"); + + b.Navigation("PeriodExam"); + + b.Navigation("PositionExam"); + + b.Navigation("ProfileImg"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CandidateDocument", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") + .WithMany() + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") + .WithMany() + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("Disables") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableAddress", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Addresses") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableCertificate", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Certificates") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableDocument", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Documents") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "DocumentFile") + .WithMany() + .HasForeignKey("DocumentFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + + b.Navigation("DocumentFile"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableEducation", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Educations") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableImportHistory", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("ImportHostories") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableOccupation", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Occupations") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisablePayment", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", "Disable") + .WithMany("Payments") + .HasForeignKey("DisableId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Disable"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.DisableScore", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", "ScoreImport") + .WithMany("Scores") + .HasForeignKey("ScoreImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ScoreImport"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithOne("ScoreImport") + .HasForeignKey("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", "PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ImportFile"); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate") + .WithMany() + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "ImportFile") + .WithMany() + .HasForeignKey("ImportFileId"); + + b.Navigation("ImportFile"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamDocument", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("PeriodExamDocuments") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExamImage", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Documents.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("PeriodExamImages") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Document"); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PositionExam", b => + { + b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam") + .WithMany("PositionExam") + .HasForeignKey("PeriodExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PeriodExam"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.CMSCandidate", b => + { + b.Navigation("CMSAgencys"); + + b.Navigation("CMSGovernments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.Disable", b => + { + b.Navigation("Addresses"); + + b.Navigation("Certificates"); + + b.Navigation("Documents"); + + b.Navigation("Educations"); + + b.Navigation("Occupations"); + + b.Navigation("Payments"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Disables.ScoreImport", b => + { + b.Navigation("Scores"); + }); + + modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b => + { + b.Navigation("BankExam"); + + b.Navigation("Candidate"); + + b.Navigation("Disables"); + + b.Navigation("ImportHostories"); + + b.Navigation("PeriodExamDocuments"); + + b.Navigation("PeriodExamImages"); + + b.Navigation("PositionExam"); + + b.Navigation("ScoreImport"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20230428220613_create table add disable.cs b/Migrations/20230428220613_create table add disable.cs new file mode 100644 index 0000000..c939513 --- /dev/null +++ b/Migrations/20230428220613_create table add disable.cs @@ -0,0 +1,663 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BMA.EHR.Recurit.Exam.Service.Migrations +{ + /// + public partial class createtableadddisable : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ImportFileId", + table: "PeriodExams", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AlterColumn( + name: "RelationshipName", + table: "Candidates", + type: "longtext", + nullable: true, + comment: "สถานภาพ", + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true, + oldComment: "ศาสนา") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "RelationshipId", + table: "Candidates", + type: "char(36)", + nullable: true, + comment: "Id สถานภาพ", + collation: "ascii_general_ci", + oldClrType: typeof(Guid), + oldType: "char(36)", + oldNullable: true, + oldComment: "Id ศาสนา") + .OldAnnotation("Relational:Collation", "ascii_general_ci"); + + migrationBuilder.CreateTable( + name: "DisableImportHistories", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + Description = table.Column(type: "longtext", nullable: false, comment: "รายละเอียดการนำเข้า") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + PeriodExamId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisableImportHistories", x => x.Id); + table.ForeignKey( + name: "FK_DisableImportHistories_PeriodExams_PeriodExamId", + column: x => x.PeriodExamId, + principalTable: "PeriodExams", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Disables", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CitizenId = table.Column(type: "varchar(13)", maxLength: 13, nullable: false, comment: "เลขประจำตัวประชาชน") + .Annotation("MySql:CharSet", "utf8mb4"), + ExamId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Prefix = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "varchar(150)", maxLength: 150, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "varchar(150)", maxLength: 150, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Gendor = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + National = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Race = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Religion = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DateOfBirth = table.Column(type: "datetime(6)", nullable: false), + Marry = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Isspecial = table.Column(type: "varchar(1)", maxLength: 1, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + RefNo = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CitizenCardIssuer = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CitizenCardExpireDate = table.Column(type: "datetime(6)", nullable: false), + Remark = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Qualified = table.Column(type: "varchar(1)", maxLength: 1, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + PeriodExamId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + CreatedDate = table.Column(type: "datetime(6)", nullable: false), + ModifiedDate = table.Column(type: "datetime(6)", nullable: false), + ApplyDate = table.Column(type: "datetime(6)", nullable: false), + PositionName = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Disables", x => x.Id); + table.ForeignKey( + name: "FK_Disables_PeriodExams_PeriodExamId", + column: x => x.PeriodExamId, + principalTable: "PeriodExams", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "ScoreImports", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + Year = table.Column(type: "int", nullable: true), + ImportFileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + PeriodExamId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_ScoreImports", x => x.Id); + table.ForeignKey( + name: "FK_ScoreImports_Documents_ImportFileId", + column: x => x.ImportFileId, + principalTable: "Documents", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ScoreImports_PeriodExams_PeriodExamId", + column: x => x.PeriodExamId, + principalTable: "PeriodExams", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DisableAddresses", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + Address = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Moo = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Soi = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Road = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + District = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Amphur = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Province = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ZipCode = table.Column(type: "varchar(5)", maxLength: 5, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Telephone = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Mobile = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Address1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Moo1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Soi1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Road1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + District1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Amphur1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Province1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ZipCode1 = table.Column(type: "varchar(5)", maxLength: 5, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisableId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisableAddresses", x => x.Id); + table.ForeignKey( + name: "FK_DisableAddresses_Disables_DisableId", + column: x => x.DisableId, + principalTable: "Disables", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DisableCertificates", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CertificateNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IssueDate = table.Column(type: "datetime(6)", nullable: false), + ExpiredDate = table.Column(type: "datetime(6)", nullable: false), + DisableId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisableCertificates", x => x.Id); + table.ForeignKey( + name: "FK_DisableCertificates_Disables_DisableId", + column: x => x.DisableId, + principalTable: "Disables", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DisableDocuments", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedDate = table.Column(type: "datetime(6)", nullable: false), + DocumentFileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + DisableId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisableDocuments", x => x.Id); + table.ForeignKey( + name: "FK_DisableDocuments_Disables_DisableId", + column: x => x.DisableId, + principalTable: "Disables", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_DisableDocuments_Documents_DocumentFileId", + column: x => x.DocumentFileId, + principalTable: "Documents", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DisableEducations", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + Degree = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Major = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + MajorGroupId = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + MajorGroupName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + University = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + GPA = table.Column(type: "double", nullable: false), + Specialist = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + HighDegree = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + BachelorDate = table.Column(type: "datetime(6)", nullable: false), + DisableId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisableEducations", x => x.Id); + table.ForeignKey( + name: "FK_DisableEducations_Disables_DisableId", + column: x => x.DisableId, + principalTable: "Disables", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DisableOccupations", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + Occupation = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + WorkAge = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Position = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Workplace = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Telephone = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisableId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisableOccupations", x => x.Id); + table.ForeignKey( + name: "FK_DisableOccupations_Disables_DisableId", + column: x => x.DisableId, + principalTable: "Disables", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DisablePayments", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + PaymentId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TextFile = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + BankCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + AccountNumber = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TransDate = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TransTime = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CustomerName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + RefNo1 = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TermBranch = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TellerId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreditDebit = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + PaymentType = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ChequeNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Amount = table.Column(type: "decimal(65,30)", nullable: false), + ChqueBankCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisableId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisablePayments", x => x.Id); + table.ForeignKey( + name: "FK_DisablePayments_Disables_DisableId", + column: x => x.DisableId, + principalTable: "Disables", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "DisableScores", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), + CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), + LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") + .Annotation("MySql:CharSet", "utf8mb4"), + LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") + .Annotation("MySql:CharSet", "utf8mb4"), + ExamId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SumA = table.Column(type: "int", nullable: false), + FullA = table.Column(type: "int", nullable: false), + PercentageA = table.Column(type: "double", nullable: false), + AStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SumB = table.Column(type: "int", nullable: false), + FullB = table.Column(type: "int", nullable: false), + PercentageB = table.Column(type: "double", nullable: false), + BStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SumAB = table.Column(type: "int", nullable: false), + ABStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SumC = table.Column(type: "int", nullable: false), + FullC = table.Column(type: "int", nullable: false), + PercentageC = table.Column(type: "double", nullable: false), + CStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExamStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Major = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Number = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ลำดับที่สอบได้") + .Annotation("MySql:CharSet", "utf8mb4"), + ScoreImportId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_DisableScores", x => x.Id); + table.ForeignKey( + name: "FK_DisableScores_ScoreImports_ScoreImportId", + column: x => x.ScoreImportId, + principalTable: "ScoreImports", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_PeriodExams_ImportFileId", + table: "PeriodExams", + column: "ImportFileId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableAddresses_DisableId", + table: "DisableAddresses", + column: "DisableId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableCertificates_DisableId", + table: "DisableCertificates", + column: "DisableId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableDocuments_DisableId", + table: "DisableDocuments", + column: "DisableId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableDocuments_DocumentFileId", + table: "DisableDocuments", + column: "DocumentFileId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableEducations_DisableId", + table: "DisableEducations", + column: "DisableId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableImportHistories_PeriodExamId", + table: "DisableImportHistories", + column: "PeriodExamId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableOccupations_DisableId", + table: "DisableOccupations", + column: "DisableId"); + + migrationBuilder.CreateIndex( + name: "IX_DisablePayments_DisableId", + table: "DisablePayments", + column: "DisableId"); + + migrationBuilder.CreateIndex( + name: "IX_Disables_PeriodExamId", + table: "Disables", + column: "PeriodExamId"); + + migrationBuilder.CreateIndex( + name: "IX_DisableScores_ScoreImportId", + table: "DisableScores", + column: "ScoreImportId"); + + migrationBuilder.CreateIndex( + name: "IX_ScoreImports_ImportFileId", + table: "ScoreImports", + column: "ImportFileId"); + + migrationBuilder.CreateIndex( + name: "IX_ScoreImports_PeriodExamId", + table: "ScoreImports", + column: "PeriodExamId", + unique: true); + + migrationBuilder.AddForeignKey( + name: "FK_PeriodExams_Documents_ImportFileId", + table: "PeriodExams", + column: "ImportFileId", + principalTable: "Documents", + principalColumn: "Id"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_PeriodExams_Documents_ImportFileId", + table: "PeriodExams"); + + migrationBuilder.DropTable( + name: "DisableAddresses"); + + migrationBuilder.DropTable( + name: "DisableCertificates"); + + migrationBuilder.DropTable( + name: "DisableDocuments"); + + migrationBuilder.DropTable( + name: "DisableEducations"); + + migrationBuilder.DropTable( + name: "DisableImportHistories"); + + migrationBuilder.DropTable( + name: "DisableOccupations"); + + migrationBuilder.DropTable( + name: "DisablePayments"); + + migrationBuilder.DropTable( + name: "DisableScores"); + + migrationBuilder.DropTable( + name: "Disables"); + + migrationBuilder.DropTable( + name: "ScoreImports"); + + migrationBuilder.DropIndex( + name: "IX_PeriodExams_ImportFileId", + table: "PeriodExams"); + + migrationBuilder.DropColumn( + name: "ImportFileId", + table: "PeriodExams"); + + migrationBuilder.AlterColumn( + name: "RelationshipName", + table: "Candidates", + type: "longtext", + nullable: true, + comment: "ศาสนา", + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true, + oldComment: "สถานภาพ") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "RelationshipId", + table: "Candidates", + type: "char(36)", + nullable: true, + comment: "Id ศาสนา", + collation: "ascii_general_ci", + oldClrType: typeof(Guid), + oldType: "char(36)", + oldNullable: true, + oldComment: "Id สถานภาพ") + .OldAnnotation("Relational:Collation", "ascii_general_ci"); + } + } +} diff --git a/Models/Candidate.cs b/Models/Candidate.cs index b4bd286..408f327 100644 --- a/Models/Candidate.cs +++ b/Models/Candidate.cs @@ -49,6 +49,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Models [Comment("Id หลักฐานชำระเงิน")] public virtual Document? PaymentImg { get; set; } + [Comment("ลำดับที่สอบได้")] + public string? Number { get; set; } [Comment("Id คำนำหน้าชื่อ")] @@ -69,10 +71,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Models [MaxLength(40), Comment("วันเกิด")] public DateTime? DateOfBirth { get; set; } - [Comment("Id ศาสนา")] + [Comment("Id สถานภาพ")] public Guid? RelationshipId { get; set; } - [Comment("ศาสนา")] + [Comment("สถานภาพ")] public string? RelationshipName { get; set; } [MaxLength(200), Comment("อีเมล")] diff --git a/Models/Disable/Disable.cs b/Models/Disable/Disable.cs new file mode 100644 index 0000000..1f20c80 --- /dev/null +++ b/Models/Disable/Disable.cs @@ -0,0 +1,81 @@ +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class Disable : EntityBase + { + + [Required, MaxLength(13), Comment("เลขประจำตัวประชาชน")] + public string CitizenId { get; set; } = string.Empty; + + [Required, MaxLength(50)] + public string ExamId { get; set; } = string.Empty; + + [Required, MaxLength(50)] + public string Prefix { get; set; } = string.Empty; + + [Required, MaxLength(150)] + public string FirstName { get; set; } = string.Empty; + + [Required, MaxLength(150)] + public string LastName { get; set; } = string.Empty; + + [MaxLength(20)] + public string Gendor { get; set; } = string.Empty; + + [MaxLength(200)] + public string National { get; set; } = string.Empty; + + [MaxLength(200)] + public string Race { get; set; } = string.Empty; + + [MaxLength(200)] + public string Religion { get; set; } = string.Empty; + + [Required] + public DateTime DateOfBirth { get; set; } + + [MaxLength(20)] + public string Marry { get; set; } = string.Empty; + + [MaxLength(1)] + public string Isspecial { get; set; } = "N"; + + [MaxLength(20)] + public string RefNo { get; set; } = string.Empty; + + [MaxLength(200)] + public string CitizenCardIssuer { get; set; } = string.Empty; + + public DateTime CitizenCardExpireDate { get; set; } + + [MaxLength(200)] + public string Remark { get; set; } = string.Empty; + + [MaxLength(1)] + public string Qualified { get; set; } = "Y"; + + public PeriodExam? PeriodExam { get; set; } + + public virtual List Addresses { get; set; } = new List(); + + public virtual List Occupations { get; set; } = new List(); + + public virtual List Certificates { get; set; } = new List(); + + public virtual List Educations { get; set; } = new List(); + + public virtual List Payments { get; set; } = new List(); + + public virtual List Documents { get; set; } = new List(); + + public DateTime CreatedDate { get; set; } = DateTime.Now; + + public DateTime ModifiedDate { get; set; } + + public DateTime ApplyDate { get; set; } + + public string? PositionName { get; set; } + } +} diff --git a/Models/Disable/DisableAddress.cs b/Models/Disable/DisableAddress.cs new file mode 100644 index 0000000..2d746ec --- /dev/null +++ b/Models/Disable/DisableAddress.cs @@ -0,0 +1,63 @@ +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisableAddress : EntityBase + { + [MaxLength(200)] + public string Address { get; set; } + + [MaxLength(200)] + public string Moo { get; set; } + + [MaxLength(200)] + public string Soi { get; set; } + + [MaxLength(200)] + public string Road { get; set; } + + [MaxLength(200)] + public string District { get; set; } + + [MaxLength(200)] + public string Amphur { get; set; } + + [MaxLength(200)] + public string Province { get; set; } + + [MaxLength(5)] + public string ZipCode { get; set; } + + [MaxLength(200)] + public string Telephone { get; set; } + + [MaxLength(200)] + public string Mobile { get; set; } + + [MaxLength(200)] + public string Address1 { get; set; } + + [MaxLength(200)] + public string Moo1 { get; set; } + + [MaxLength(200)] + public string Soi1 { get; set; } + + [MaxLength(200)] + public string Road1 { get; set; } + + [MaxLength(200)] + public string District1 { get; set; } + + [MaxLength(200)] + public string Amphur1 { get; set; } + + [MaxLength(200)] + public string Province1 { get; set; } + + [MaxLength(5)] + public string ZipCode1 { get; set; } + + public Disable Disable { get; set; } + } +} diff --git a/Models/Disable/DisableCertificate.cs b/Models/Disable/DisableCertificate.cs new file mode 100644 index 0000000..b1108ac --- /dev/null +++ b/Models/Disable/DisableCertificate.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisableCertificate : EntityBase + { + [MaxLength(50)] + public string CertificateNo { get; set; } + + [MaxLength(200)] + public string Description { get; set; } + + public DateTime IssueDate { get; set; } + + public DateTime ExpiredDate { get; set; } + + public Disable Disable { get; set; } + } +} diff --git a/Models/Disable/DisableDocument.cs b/Models/Disable/DisableDocument.cs new file mode 100644 index 0000000..678a259 --- /dev/null +++ b/Models/Disable/DisableDocument.cs @@ -0,0 +1,13 @@ +using BMA.EHR.Recurit.Exam.Service.Models.Documents; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisableDocument : EntityBase + { + public DateTime CreatedDate { get; set; } + + public Document DocumentFile { get; set; } + + public Disable Disable { get; set; } + } +} diff --git a/Models/Disable/DisableEducation.cs b/Models/Disable/DisableEducation.cs new file mode 100644 index 0000000..cb2cbb3 --- /dev/null +++ b/Models/Disable/DisableEducation.cs @@ -0,0 +1,33 @@ +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisableEducation : EntityBase + { + [MaxLength(200)] + public string Degree { get; set; } + + [MaxLength(200)] + public string Major { get; set; } + + [MaxLength(20)] + public string MajorGroupId { get; set; } + + [MaxLength(200)] + public string MajorGroupName { get; set; } + + [MaxLength(200)] + public string University { get; set; } + public double GPA { get; set; } = 0.0; + + [MaxLength(1000)] + public string Specialist { get; set; } + + [MaxLength(200)] + public string HighDegree { get; set; } + + public DateTime BachelorDate { get; set; } + + public Disable Disable { get; set; } + } +} diff --git a/Models/Disable/DisableImportHistory.cs b/Models/Disable/DisableImportHistory.cs new file mode 100644 index 0000000..bddb2d4 --- /dev/null +++ b/Models/Disable/DisableImportHistory.cs @@ -0,0 +1,14 @@ +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisableImportHistory : EntityBase + { + [Required, Comment("รายละเอียดการนำเข้า"), Column(Order = 1)] + public string Description { get; set; } = string.Empty; + + public PeriodExam PeriodExam { get; set; } + } +} \ No newline at end of file diff --git a/Models/Disable/DisableOccupation.cs b/Models/Disable/DisableOccupation.cs new file mode 100644 index 0000000..23f59c6 --- /dev/null +++ b/Models/Disable/DisableOccupation.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisableOccupation : EntityBase + { + [MaxLength(200)] + public string Occupation { get; set; } + + [MaxLength(200)] + public string WorkAge { get; set; } + + [MaxLength(200)] + public string Position { get; set; } + + [MaxLength(200)] + public string Workplace { get; set; } + + [MaxLength(200)] + public string Telephone { get; set; } + + public Disable Disable { get; set; } + } +} diff --git a/Models/Disable/DisablePayment.cs b/Models/Disable/DisablePayment.cs new file mode 100644 index 0000000..437e963 --- /dev/null +++ b/Models/Disable/DisablePayment.cs @@ -0,0 +1,56 @@ +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisablePayment : EntityBase + { + [MaxLength(50)] + public string PaymentId { get; set; } + + [MaxLength(50)] + public string CompanyCode { get; set; } + + [MaxLength(50)] + public string TextFile { get; set; } + + [MaxLength(50)] + public string BankCode { get; set; } + + [MaxLength(50)] + public string AccountNumber { get; set; } + + [MaxLength(50)] + public string TransDate { get; set; } + + [MaxLength(50)] + public string TransTime { get; set; } + + [MaxLength(200)] + public string CustomerName { get; set; } + + [MaxLength(50)] + public string RefNo1 { get; set; } + + [MaxLength(50)] + public string TermBranch { get; set; } + + [MaxLength(50)] + public string TellerId { get; set; } + + [MaxLength(50)] + public string CreditDebit { get; set; } + + [MaxLength(50)] + public string PaymentType { get; set; } + + [MaxLength(50)] + public string ChequeNo { get; set; } + + public decimal Amount { get; set; } + + [MaxLength(50)] + public string ChqueBankCode { get; set; } + + public Disable Disable { get; set; } + } +} diff --git a/Models/Disable/DisableScore.cs b/Models/Disable/DisableScore.cs new file mode 100644 index 0000000..1e081fc --- /dev/null +++ b/Models/Disable/DisableScore.cs @@ -0,0 +1,54 @@ +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class DisableScore : EntityBase + { + [Required, MaxLength(50)] + public string ExamId { get; set; } + + public int SumA { get; set; } + + public int FullA { get; set; } + + public double PercentageA { get; set; } + + [MaxLength(50)] + public string AStatus { get; set; } + + public int SumB { get; set; } + + public int FullB { get; set; } + + public double PercentageB { get; set; } + + [MaxLength(50)] + public string BStatus { get; set; } + + public int SumAB { get; set; } + + [Required, MaxLength(50)] + public string ABStatus { get; set; } + + public int SumC { get; set; } + + public int FullC { get; set; } + + public double PercentageC { get; set; } + + [MaxLength(50)] + public string CStatus { get; set; } + + [Required, MaxLength(50)] + public string ExamStatus { get; set; } + + [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/Models/Disable/ScoreImport.cs b/Models/Disable/ScoreImport.cs new file mode 100644 index 0000000..71b0ac7 --- /dev/null +++ b/Models/Disable/ScoreImport.cs @@ -0,0 +1,19 @@ +using BMA.EHR.Recurit.Exam.Service.Models.Documents; +using System.ComponentModel.DataAnnotations.Schema; + +namespace BMA.EHR.Recurit.Exam.Service.Models.Disables +{ + public class ScoreImport : EntityBase + { + public int? Year { get; set; } + + public Document ImportFile { get; set; } = new Document(); + + public virtual List Scores { get; set; } = new List(); + + [ForeignKey("FK_Score_Import_ID")] + public Guid PeriodExamId { get; set; } + + public PeriodExam PeriodExam { get; set; } + } +} diff --git a/Models/PeriodExam.cs b/Models/PeriodExam.cs index 4cc2840..b36b9b8 100644 --- a/Models/PeriodExam.cs +++ b/Models/PeriodExam.cs @@ -1,6 +1,8 @@ using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; +using BMA.EHR.Recurit.Exam.Service.Models.Disables; +using BMA.EHR.Recurit.Exam.Service.Models.Documents; namespace BMA.EHR.Recurit.Exam.Service.Models { @@ -95,5 +97,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Models [Comment("รูป")] public virtual List PeriodExamImages { get; set; } = new(); + public Document? ImportFile { get; set; } = new Document(); + public List Disables { get; set; } = new List(); + public ScoreImport? ScoreImport { get; set; } + public List ImportHostories { get; set; } = new List(); } } diff --git a/Program.cs b/Program.cs index 5cf91a7..4301c4b 100644 --- a/Program.cs +++ b/Program.cs @@ -82,6 +82,7 @@ builder.Services.AddCors(options => options.AddDefaultPolicy(builder => // Register Service builder.Services.AddTransient(); +builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); diff --git a/Request/Disables/CandidateFileHeader.cs b/Request/Disables/CandidateFileHeader.cs new file mode 100644 index 0000000..133b346 --- /dev/null +++ b/Request/Disables/CandidateFileHeader.cs @@ -0,0 +1,84 @@ +namespace BMA.EHR.Recurit.Exam.Service.Request.Disables +{ + public class CandidateFileHeader + { + // Profile + public static string ExamID = "เลขประจำตัวสอบ"; + public static string PersonalID = "CustomerID"; + public static string Prefix = "Name1"; + public static string FirstName = "Name2"; + public static string LastName = "Name3"; + public static string Gender = "Gender"; + public static string National = "National"; + public static string Race = "Race"; + public static string Religion = "Religion"; + public static string DateOfBirth = "BirthDMY"; + public static string Marry = "Marry"; + public static string RefNo = "RefNo1"; + public static string PersonalCardIssue = "CusIDFrom"; + public static string PersonalCardExpireDate = "CusIDExpireDate"; + public static string ApplyDate = "DateTime"; + public static string PositionName = "PositionName"; + + // Address + public static string Address = "Address"; + public static string Moo = "Moo"; + public static string Soi = "Soi"; + public static string Road = "Road"; + public static string District = "District"; + public static string Amphur = "Amphur"; + public static string Province = "Province"; + public static string ZipCode = "Zipcode"; + public static string Telephone = "Telephone"; + public static string Mobile = "TelMobile"; + public static string Address1 = "Address1"; + public static string Moo1 = "Moo1"; + public static string Soi1 = "Soi1"; + public static string Road1 = "Road1"; + public static string District1 = "District1"; + public static string Amphur1 = "Amphur1"; + public static string ZipCode1 = "Zipcode1"; + + // Occupation + public static string Occupation = "Occupation"; + public static string WorkAge = "WorkAge"; + public static string Position = "txtPosition"; + public static string Workplace = "txtWorkplace"; + public static string WorkplaceTelephone = "TxtTelephone"; + + // Certificate + public static string CertificateNo = "CerNo"; + public static string CertificateDesc = "CerTeacherDesc"; + public static string CertificateIssueDate = "CerNoDMY"; + public static string CertificateExpireDate = "CerNoExpDMY"; + + // EEducation + public static string Degree = "Degree"; + public static string Major = "Major"; + public static string MajorGroupID = "MajorGroup"; + public static string MajorGroupName = "txtMajorGroup"; + public static string GPA = "GPA"; + public static string SpecialList = "SpecialList"; + public static string University = "University"; + public static string HighDegree = "HighDegree"; + public static string BachelorDate = "BachelorDMY"; + + // payment + public static string PaymentID = "ID"; + public static string CompanyCode = "CompanyCode"; + public static string TextFile = "TextFile"; + public static string BankCode = "BankCode"; + public static string AccouontNumer = "AccountNumber"; + public static string TransDate = "TransDate"; + public static string TransTime = "TransTime"; + public static string CustomerName = "CustomerName"; + public static string RefNo1 = "RefNo1"; + public static string TermBranch = "TermBranch"; + public static string TellerID = "TellerID"; + public static string CreditDebit = "CreditDeBit"; + public static string Type = "Type"; + public static string ChequeNo = "ChequeNo"; + public static string Amount = "Amount"; + public static string ChqBankCode = "ChqBankCode"; + } +} diff --git a/Request/Disables/DisableExamRequest.cs b/Request/Disables/DisableExamRequest.cs new file mode 100644 index 0000000..c2ffa2e --- /dev/null +++ b/Request/Disables/DisableExamRequest.cs @@ -0,0 +1,16 @@ +namespace BMA.EHR.Recurit.Exam.Service.Request.Disables +{ + public class DisableExamRequest + { + /// + /// ข้อมูลคุณสมบัติของผู้เข้าสอบ โดยส่งมาจากหน้าจอ 'มีคุณสมบัติ' 'ขาดคุณสมบัติ' + /// + public string ExamAttribute { get; set; } + + + /// + /// ข้อมูลผลการสอบ 'ผ่าน' 'ไม่ผ่าน' + /// + public string ExamResult { get; set; } + } +} diff --git a/Request/Disables/PostDisableImportRequest.cs b/Request/Disables/PostDisableImportRequest.cs new file mode 100644 index 0000000..8c74ee5 --- /dev/null +++ b/Request/Disables/PostDisableImportRequest.cs @@ -0,0 +1,86 @@ +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations.Schema; +using System.ComponentModel.DataAnnotations; + +namespace BMA.EHR.Recurit.Exam.Service.Request.Disables +{ + /// + /// ตัวแปรสำหรับสร้างข้อมูลการสอบคัดเลือกผู้พิการ + /// + public class PostDisableImportRequest + { + /// + /// ปีงบประมาณที่จัดสอบ + /// + [Required] + public int Year { get; set; } + + /// + /// รอบการสอบ + /// + [Required, MaxLength(250)] + public string Name { get; set; } = string.Empty; + + /// + /// ครั้งที่ + /// + [Required] + public int Round { get; set; } = 1; + + /// + /// รายละเอียด + /// + public string? Detail { get; set; } + + /// + /// ค่าธรรมเนียม + /// + public int Fee { get; set; } = 0; + + /// + /// วันเริ่มประกาศ + /// + public DateTime AnnouncementStartDate { get; set; } + + /// + /// วันสิ้นสุดประกาศ + /// + public DateTime AnnouncementEndDate { get; set; } + + /// + /// วันเริ่มชำระเงิน + /// + public DateTime PaymentStartDate { get; set; } + + /// + /// วันสิ้นสุดชำระเงิน + /// + public DateTime PaymentEndDate { get; set; } + + /// + /// วันเริ่มสมัครสอบ + /// + public DateTime RegisterStartDate { get; set; } + + /// + /// วันสิ้นสุดสมัครสอบ + /// + public DateTime RegisterEndDate { get; set; } + + /// + /// วันที่สอบ + /// + public DateTime ExamDate { get; set; } + + /// + /// หมายเหตุ + /// + public string? Note { get; set; } + + /// + /// วันที่ประกาศผลสอบ + /// + public DateTime AnnouncementDate { get; set; } + } +} diff --git a/Request/RequestCardCandidate.cs b/Request/RequestCardCandidate.cs index 95893bd..b341387 100644 --- a/Request/RequestCardCandidate.cs +++ b/Request/RequestCardCandidate.cs @@ -19,6 +19,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request public string? PointC { get; set; } public string? ResultC { get; set; } public string? Pass { get; set; } + public string? Number { get; set; } public DateTime? AnnouncementDate { get; set; } public Guid? Id { get; set; } } diff --git a/Request/RequestImportSeat.cs b/Request/RequestImportSeat.cs index cabdcbf..d4a08de 100644 --- a/Request/RequestImportSeat.cs +++ b/Request/RequestImportSeat.cs @@ -15,5 +15,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Request public string? PointC { get; set; } public string? ResultC { get; set; } public string? Pass { get; set; } + public string? Number { get; set; } } } diff --git a/Request/RequestPeriodExam.cs b/Request/RequestPeriodExam.cs index 0c63ea7..edccac0 100644 --- a/Request/RequestPeriodExam.cs +++ b/Request/RequestPeriodExam.cs @@ -6,7 +6,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request { public string Name { get; set; } = string.Empty; public bool CheckDocument { get; set; } = false; - public bool CheckDisability { get; set; } = false; + // public bool CheckDisability { get; set; } = false; public int? Round { get; set; } public int? Year { get; set; } public float? Fee { get; set; } = 0; diff --git a/Services/CandidateService.cs b/Services/CandidateService.cs index 63ad048..3430924 100644 --- a/Services/CandidateService.cs +++ b/Services/CandidateService.cs @@ -63,6 +63,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncInformation(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -133,6 +134,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncAddress(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -201,6 +203,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncFamily(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -273,6 +276,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncOccupation(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -319,6 +323,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task> GetsAsyncCareer(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -351,6 +356,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task> GetsAsyncEducation(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -383,6 +389,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task> GetsAsyncFileUpload(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -465,6 +472,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncProfileImage(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -516,6 +524,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncPaymentImg(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -568,6 +577,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncRegisterExam(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .Include(x => x.BankExam) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); @@ -610,6 +620,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task CreateAsyncCandidate(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -1426,6 +1437,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task DeleteAsyncDocument(string examId, string positionId, string documentId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .Include(x => x.PositionExam) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); @@ -1651,6 +1663,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetStatusCandidateService(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -1680,6 +1693,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task UserCheckCandidateService(string examId, string positionId, string status) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .Include(x => x.PositionExam) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); @@ -1856,6 +1870,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsAsyncCardCandidate(string examId, string positionId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(p => p.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (exam == null) @@ -1898,6 +1913,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services PointC = candidate.PointC, ResultC = candidate.ResultC, Pass = candidate.Pass, + Number = candidate.Number, AnnouncementDate = exam.AnnouncementDate.AddYears(2), Id = candidate.Id, }; @@ -1929,6 +1945,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services PointC = candidate.PointC, ResultC = candidate.ResultC, Pass = candidate.Pass, + Number = candidate.Number, AnnouncementDate = candidate.PeriodExam?.AnnouncementDate.AddYears(2), Id = candidate.Id, }; diff --git a/Services/DisableService.cs b/Services/DisableService.cs new file mode 100644 index 0000000..8ba455c --- /dev/null +++ b/Services/DisableService.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using BMA.EHR.Recurit.Exam.Service.Data; +using BMA.EHR.Recurit.Exam.Service.Models.Disables; + +namespace BMA.EHR.Recurit.Exam.Service.Services +{ + public class DisableService + { + private readonly ApplicationDbContext _context; + + public DisableService(ApplicationDbContext context) + { + _context = context; + } + + public int GetExamCount(string citizenId) + { + try + { + var count = _context.Disables.AsQueryable() + .Where(x => x.CitizenId == citizenId) + .Count(); + + return count; + } + catch + { + throw; + } + } + + public async Task GetExamAttributeAsync(Guid period, Guid exam) + { + try + { + var payment = await _context.DisablePayments.AsQueryable() + .Include(x => x.Disable) + .ThenInclude(x => x.PeriodExam) + .Where(x => x.Disable.Id == exam) + .Where(x => x.Disable.PeriodExam.Id == period) + .FirstOrDefaultAsync(); + + 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/Services/PeriodExamService.cs b/Services/PeriodExamService.cs index a1f0389..b4ac8b8 100644 --- a/Services/PeriodExamService.cs +++ b/Services/PeriodExamService.cs @@ -1,5 +1,6 @@ using System.Security.Claims; using System.Text.Json; +using BMA.EHR.Extensions; using BMA.EHR.Recurit.Exam.Service.Core; using BMA.EHR.Recurit.Exam.Service.Data; using BMA.EHR.Recurit.Exam.Service.Models; @@ -52,10 +53,42 @@ namespace BMA.EHR.Recurit.Exam.Service.Services #region " Methods " + private string GenerateStatusCandidate(string status) + { + switch (status.Trim().ToUpper()) + { + case "REGISTER": return "รอยืนยันสมัครสอบ"; + case "CHECKREGISTER": return "ตรวจสอบข้อมูลสมัครสอบ"; + case "PAYMENT": return "รอชำระค่าสมัครสอบ"; + case "REJECTREGISTER": return "ปฏิเสธตรวจสอบข้อมูลสมัคร"; + case "CHECKPAYMENT": return "ตรวจสอบหลักฐานชำระเงิน"; + case "REJECTPAYMENT": return "หลักฐานชำระเงินไม่ถูกต้อง"; + case "CHECKSEAT": return "จัดที่นั่งสอบ"; + case "CHECKPOINT": return "สรุปคะแนนสอบ"; + case "DONE": return "สอบคัดเลือกสำเร็จ"; + case "WAIVER": return "สละสิทธิ์สอบ"; + default: return status; + } + } + + private string GenerateStatusOccupation(string status) + { + switch (status.Trim().ToUpper()) + { + case "OFFICIAL": return "ข้าราชการกรุงเทพมหานคร"; + case "PERSONNEL": return "บุคลากรกรุงเทพมหานคร"; + case "OFFICIALSOTHER": return "ข้าราชการประเภทอื่น"; + case "EMPLOYEE": return "ลูกจ้าง/พนักงานราชการของส่วนราชการอื่น"; + case "OTHER": return "อื่นๆ"; + default: return status; + } + } + public async Task> GetsAsync(string type, bool showAll = true) { return await _context.PeriodExams.AsQueryable() .Where(p => p.IsActive) + .Where(p => p.CheckDisability == false) .Where(p => type.ToUpper() == "ALL" ? (p.AnnouncementExam == true || p.AnnouncementExam == false) : (type.ToUpper() == "EXAM" ? p.AnnouncementExam == true : p.AnnouncementExam == false)) .OrderByDescending(d => d.CreatedAt) .Select(x => new PeriodExamCandidateResponseItem @@ -93,6 +126,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsExamAndCandidateAsync(string examId, bool showAll = true) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .Include(x => x.PositionExam) .Include(x => x.BankExam) .Include(x => x.PeriodExamDocuments) @@ -200,6 +234,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsNamePositionAsync(string examId, string positionId) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .Include(x => x.PositionExam) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); @@ -234,7 +269,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services { Name = inserted.Name, CheckDocument = inserted.CheckDocument, - CheckDisability = inserted.CheckDisability, Round = inserted.Round, Year = inserted.Year, Fee = inserted.Fee, @@ -312,6 +346,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task UpdateAsync(string examId, RequestPeriodExam updated) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .Include(x => x.BankExam) .Include(x => x.PositionExam) .Include(x => x.Candidate) @@ -324,7 +359,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services periodExam.Name = updated.Name; periodExam.CheckDocument = updated.CheckDocument; - periodExam.CheckDisability = updated.CheckDisability; periodExam.Round = updated.Round; periodExam.Year = updated.Year; periodExam.Fee = updated.Fee; @@ -462,6 +496,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task UpdateDocAsync(string examId, IFormFileCollection files) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (periodExam == null) @@ -492,6 +527,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task UpdateImgAsync(string examId, IFormFileCollection files) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (periodExam == null) @@ -527,6 +563,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task DeleteAsyncDocument(string examId, string documentId) { var exam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .Include(x => x.PositionExam) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); @@ -539,6 +576,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task DeleteAsync(string examId) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (periodExam == null) @@ -551,6 +589,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task> GetsCandidateByStatusAsync(string examId, string status) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (periodExam == null) @@ -563,6 +602,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services .OrderByDescending(d => d.CreatedAt) .Where(x => x.PeriodExam == periodExam && x.Status != "register" && x.Status != "rejectRegister") .ToListAsync(); + if (candidate.Where(x => x.Status == "done").FirstOrDefault() != null) + candidate = candidate.OrderBy(x => x.Number).ToList(); var i = 0; foreach (var item in candidate) { @@ -579,6 +620,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services .OrderByDescending(d => d.CreatedAt) .Where(x => x.PeriodExam == periodExam && x.Status == status) .ToListAsync(); + if (candidate.Where(x => x.Status == "done").FirstOrDefault() != null) + candidate = candidate.OrderBy(x => x.Number).ToList(); var i = 0; foreach (var item in candidate) { @@ -782,16 +825,17 @@ namespace BMA.EHR.Recurit.Exam.Service.Services { list.Add(new RequestImportSeat { - CitizenId = worksheet.Cells[row, 1].Value != null ? worksheet.Cells[row, 1].Value.ToString() : null, - ExamIdenNumber = worksheet.Cells[row, 2].Value != null ? worksheet.Cells[row, 2].Value.ToString() : null, - SeatNumber = worksheet.Cells[row, 3].Value != null ? worksheet.Cells[row, 3].Value.ToString() : null, - PointTotalB = worksheet.Cells[row, 4].Value != null ? worksheet.Cells[row, 4].Value.ToString() : null, - PointB = worksheet.Cells[row, 5].Value != null ? worksheet.Cells[row, 5].Value.ToString() : null, - ResultB = worksheet.Cells[row, 6].Value != null ? worksheet.Cells[row, 6].Value.ToString() : null, - PointTotalC = worksheet.Cells[row, 7].Value != null ? worksheet.Cells[row, 7].Value.ToString() : null, - PointC = worksheet.Cells[row, 8].Value != null ? worksheet.Cells[row, 8].Value.ToString() : null, - ResultC = worksheet.Cells[row, 9].Value != null ? worksheet.Cells[row, 9].Value.ToString() : null, - Pass = worksheet.Cells[row, 10].Value != null ? (worksheet.Cells[row, 10].Value.ToString()) : null, + Number = worksheet.Cells[row, 1].Value != null ? worksheet.Cells[row, 1].Value.ToString() : null, + CitizenId = worksheet.Cells[row, 2].Value != null ? worksheet.Cells[row, 2].Value.ToString() : null, + ExamIdenNumber = worksheet.Cells[row, 3].Value != null ? worksheet.Cells[row, 3].Value.ToString() : null, + SeatNumber = worksheet.Cells[row, 4].Value != null ? worksheet.Cells[row, 4].Value.ToString() : null, + PointTotalB = worksheet.Cells[row, 5].Value != null ? worksheet.Cells[row, 5].Value.ToString() : null, + PointB = worksheet.Cells[row, 6].Value != null ? worksheet.Cells[row, 6].Value.ToString() : null, + ResultB = worksheet.Cells[row, 7].Value != null ? worksheet.Cells[row, 7].Value.ToString() : null, + PointTotalC = worksheet.Cells[row, 8].Value != null ? worksheet.Cells[row, 8].Value.ToString() : null, + PointC = worksheet.Cells[row, 9].Value != null ? worksheet.Cells[row, 9].Value.ToString() : null, + ResultC = worksheet.Cells[row, 10].Value != null ? worksheet.Cells[row, 10].Value.ToString() : null, + Pass = worksheet.Cells[row, 11].Value != null ? (worksheet.Cells[row, 11].Value.ToString()) : null, }); } } @@ -804,6 +848,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task UploadSeatCandidateAsync(string examId, IFormFile excels) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (periodExam == null) @@ -859,6 +904,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task UploadPointCandidateAsync(string examId, IFormFile excels) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (periodExam == null) @@ -886,6 +932,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services candidate.PointC = item.PointC; candidate.ResultC = item.ResultC; candidate.Pass = item.Pass; + candidate.Number = item.Number; var subject = "แจ้งผลการสมัครสอบคัดเลือก " + periodExam.Name; var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: สอบคัดเลือกสำเร็จ"; if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email); @@ -920,6 +967,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task DownloadCandidateAsync(string examId) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); if (periodExam == null) @@ -951,30 +999,32 @@ namespace BMA.EHR.Recurit.Exam.Service.Services summarySheet.TabColor = System.Drawing.Color.Black; // summarySheet.DefaultRowHeight = 17; summarySheet.Row(1).Style.Font.Bold = true; - summarySheet.Cells[1, 1].Value = "เลขบัตรประชาชน"; - summarySheet.Cells[1, 2].Value = "เลขประจำตัวสอบ"; - summarySheet.Cells[1, 3].Value = "เลขที่นั่งสอบ"; - summarySheet.Cells[1, 4].Value = "คะแนนเต็มภาค ข"; - summarySheet.Cells[1, 5].Value = "คะแนนภาค ข"; - summarySheet.Cells[1, 6].Value = "ผลสอบภาค ข"; - summarySheet.Cells[1, 7].Value = "คะแนนเต็มภาค ค"; - summarySheet.Cells[1, 8].Value = "คะแนนภาค ค"; - summarySheet.Cells[1, 9].Value = "ผลสอบภาค ค"; - summarySheet.Cells[1, 10].Value = "ผลการสอบ"; + summarySheet.Cells[1, 1].Value = "ลำดับที่สอบได้"; + summarySheet.Cells[1, 2].Value = "เลขบัตรประชาชน"; + summarySheet.Cells[1, 3].Value = "เลขประจำตัวสอบ"; + summarySheet.Cells[1, 4].Value = "เลขที่นั่งสอบ"; + summarySheet.Cells[1, 5].Value = "คะแนนเต็มภาค ข"; + summarySheet.Cells[1, 6].Value = "คะแนนภาค ข"; + summarySheet.Cells[1, 7].Value = "ผลสอบภาค ข"; + summarySheet.Cells[1, 8].Value = "คะแนนเต็มภาค ค"; + summarySheet.Cells[1, 9].Value = "คะแนนภาค ค"; + summarySheet.Cells[1, 10].Value = "ผลสอบภาค ค"; + summarySheet.Cells[1, 11].Value = "ผลการสอบ"; int row = 2; foreach (var item in candidates) { - summarySheet.Cells[row, 1].Value = item.CitizenId; - summarySheet.Cells[row, 2].Value = item.ExamIdenNumber; - summarySheet.Cells[row, 3].Value = item.SeatNumber; - summarySheet.Cells[row, 4].Value = item.PointTotalB; - summarySheet.Cells[row, 5].Value = item.PointB; - summarySheet.Cells[row, 6].Value = item.ResultB; - summarySheet.Cells[row, 7].Value = item.PointTotalC; - summarySheet.Cells[row, 8].Value = item.PointC; - summarySheet.Cells[row, 9].Value = item.ResultC; - summarySheet.Cells[row, 10].Value = item.Pass; + summarySheet.Cells[row, 1].Value = item.Number; + summarySheet.Cells[row, 2].Value = item.CitizenId; + summarySheet.Cells[row, 3].Value = item.ExamIdenNumber; + summarySheet.Cells[row, 4].Value = item.SeatNumber; + summarySheet.Cells[row, 5].Value = item.PointTotalB; + summarySheet.Cells[row, 6].Value = item.PointB; + summarySheet.Cells[row, 7].Value = item.ResultB; + summarySheet.Cells[row, 8].Value = item.PointTotalC; + summarySheet.Cells[row, 9].Value = item.PointC; + summarySheet.Cells[row, 10].Value = item.ResultC; + summarySheet.Cells[row, 11].Value = item.Pass; row++; } summarySheet.Cells[summarySheet.Dimension.Address].AutoFitColumns(); @@ -988,6 +1038,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task GetsPaymentExamAsync(string examId) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .Include(x => x.BankExam) .Where(x => x.Id == Guid.Parse(examId)) .Select(x => new PeriodExam @@ -1006,6 +1057,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services public async Task> GetsDashboardPaymentExamAsync(string examId) { var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) .Include(x => x.Candidate) .ThenInclude(x => x.PaymentImg) .Where(x => x.Id == Guid.Parse(examId)) @@ -1068,6 +1120,389 @@ namespace BMA.EHR.Recurit.Exam.Service.Services return dashboard; } + + public async Task DownloadCandidateAllAsync(string examId) + { + var periodExam = await _context.PeriodExams.AsQueryable() + .Where(x => x.CheckDisability == false) + .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); + + if (periodExam == null) + throw new Exception(GlobalMessages.ExamNotFound); + + // var _candidates = (from c in _context.Candidates + // where c.PeriodExam == periodExam + // select new + // { + // Id = c.Id, + // Status = c.Status, + // CitizenId = c.CitizenId, + // FullName = $"{c.PrefixName}{c.FirstName} {c.LastName}", + // Nationality = c.Nationality, + // DateOfBirth = c.DateOfBirth == null ? "" : c.DateOfBirth.Value.Date.ToThaiShortDate(), + // Age = c.DateOfBirth == null ? "" : c.DateOfBirth.Value.Date.CalculateGovAgeStr(0, 0), + // RelationshipName = c.RelationshipName, + // Telephone = c.Telephone, + // MobilePhone = c.MobilePhone, + // Email = c.Email, + // Knowledge = c.Knowledge, + // RegistAddress = c.RegistAddress, + // RegistProvinceName = c.RegistProvinceName, + // RegistDistrictName = c.RegistDistrictName, + // RegistSubDistrictName = c.RegistSubDistrictName, + // RegistZipCode = c.RegistZipCode, + // CurrentAddress = c.CurrentAddress, + // CurrentProvinceName = c.CurrentProvinceName, + // CurrentDistrictName = c.CurrentDistrictName, + // CurrentSubDistrictName = c.CurrentSubDistrictName, + // CurrentZipCode = c.CurrentZipCode, + // MarryFullName = $"{c.MarryPrefixName}{c.MarryFirstName} {c.MarryLastName}", + // FatherFullName = $"{c.FatherPrefixName}{c.FatherFirstName} {c.FatherLastName}", + // MotherFullName = $"{c.MotherPrefixName}{c.MotherFirstName} {c.MotherLastName}", + // OccupationType = c.OccupationType, + // OccupationPosition = c.OccupationPosition, + // OccupationCompany = c.OccupationCompany, + // OccupationDepartment = c.OccupationDepartment, + // OccupationEmail = c.OccupationEmail, + // OccupationTelephone = c.OccupationTelephone, + + + // Number = c.Number, + // ExamIdenNumber = c.ExamIdenNumber, + // SeatNumber = c.SeatNumber, + // PointTotalB = c.PointTotalB, + // PointB = c.PointB, + // ResultB = c.ResultB, + // PointTotalC = c.PointTotalC, + // PointC = c.PointC, + // ResultC = c.ResultC, + // Pass = c.Pass, + // } + // ).ToList(); + + var candidates = await _context.Candidates + .AsQueryable() + .OrderBy(x => x.ExamIdenNumber) + .Where(x => x.PeriodExam == periodExam) + .Select(c => new + { + Id = c.Id, + Status = c.Status, + CitizenId = c.CitizenId, + FullName = $"{c.PrefixName}{c.FirstName} {c.LastName}", + Nationality = c.Nationality, + DateOfBirth = c.DateOfBirth == null ? "" : c.DateOfBirth.Value.Date.ToThaiShortDate(), + Age = c.DateOfBirth == null ? "" : c.DateOfBirth.Value.Date.CalculateGovAgeStr(0, 0), + RelationshipName = c.RelationshipName, + Telephone = c.Telephone, + MobilePhone = c.MobilePhone, + Email = c.Email, + Knowledge = c.Knowledge, + RegistAddress = c.RegistAddress, + RegistProvinceName = c.RegistProvinceName, + RegistDistrictName = c.RegistDistrictName, + RegistSubDistrictName = c.RegistSubDistrictName, + RegistZipCode = c.RegistZipCode, + CurrentAddress = c.CurrentAddress, + CurrentProvinceName = c.CurrentProvinceName, + CurrentDistrictName = c.CurrentDistrictName, + CurrentSubDistrictName = c.CurrentSubDistrictName, + CurrentZipCode = c.CurrentZipCode, + MarryFullName = $"{c.MarryPrefixName}{c.MarryFirstName} {c.MarryLastName}", + FatherFullName = $"{c.FatherPrefixName}{c.FatherFirstName} {c.FatherLastName}", + MotherFullName = $"{c.MotherPrefixName}{c.MotherFirstName} {c.MotherLastName}", + OccupationType = c.OccupationType, + OccupationPosition = c.OccupationPosition, + OccupationCompany = c.OccupationCompany, + OccupationDepartment = c.OccupationDepartment, + OccupationEmail = c.OccupationEmail, + OccupationTelephone = c.OccupationTelephone, + + + Number = c.Number, + ExamIdenNumber = c.ExamIdenNumber, + SeatNumber = c.SeatNumber, + PointTotalB = c.PointTotalB, + PointB = c.PointB, + ResultB = c.ResultB, + PointTotalC = c.PointTotalC, + PointC = c.PointC, + ResultC = c.ResultC, + Pass = c.Pass, + }) + .ToListAsync(); + + var stream = new MemoryStream(); + using (var package = new ExcelPackage(stream)) + { + var summarySheet = package.Workbook.Worksheets.Add("Candidate"); + summarySheet.TabColor = System.Drawing.Color.Black; + // summarySheet.DefaultRowHeight = 17; + summarySheet.Row(1).Style.Font.Bold = true; + summarySheet.Cells[1, 1].Value = "สถานะสอบคัดเลือก"; + summarySheet.Cells[1, 2].Value = "เลขบัตรประชาชน"; + summarySheet.Cells[1, 3].Value = "ชื่อ-สกุล"; + summarySheet.Cells[1, 4].Value = "สัญชาติ"; + summarySheet.Cells[1, 5].Value = "วันเกิด"; + summarySheet.Cells[1, 6].Value = "อายุ"; + summarySheet.Cells[1, 7].Value = "สถานภาพ"; + summarySheet.Cells[1, 8].Value = "โทรศัพท์"; + summarySheet.Cells[1, 9].Value = "โทรศัพท์มือถือ"; + summarySheet.Cells[1, 10].Value = "อีเมล"; + summarySheet.Cells[1, 11].Value = "ความรู้ความสามารถพิเศษ"; + summarySheet.Cells[1, 12].Value = "ที่อยู่ตามทะเบียนบ้าน"; + summarySheet.Cells[1, 13].Value = "จังหวัดที่อยู่ตามทะเบียนบ้าน"; + summarySheet.Cells[1, 14].Value = "เขต/อำเภอที่อยู่ตามทะเบียนบ้าน"; + summarySheet.Cells[1, 15].Value = "ตำบล/แขวงที่อยู่ตามทะเบียนบ้าน"; + summarySheet.Cells[1, 16].Value = "รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"; + summarySheet.Cells[1, 17].Value = "ที่อยู่ปัจจุบัน"; + summarySheet.Cells[1, 18].Value = "จังหวัดที่อยู่ปัจจุบัน"; + summarySheet.Cells[1, 19].Value = "เขต/อำเภอที่อยู่ปัจจุบัน"; + summarySheet.Cells[1, 20].Value = "ตำบล/แขวงที่อยู่ปัจจุบัน"; + summarySheet.Cells[1, 21].Value = "รหัสไปรษณีย์ที่อยู่ปัจจุบัน"; + summarySheet.Cells[1, 22].Value = "คู่สมรส"; + summarySheet.Cells[1, 23].Value = "บิดา"; + summarySheet.Cells[1, 24].Value = "มารดา"; + summarySheet.Cells[1, 25].Value = "อาชีพ"; + summarySheet.Cells[1, 26].Value = "ตำแหน่ง"; + summarySheet.Cells[1, 27].Value = "สำนัก/บริษัท"; + summarySheet.Cells[1, 28].Value = "กอง/ฝ่าย"; + summarySheet.Cells[1, 29].Value = "อีเมลบริษัท"; + summarySheet.Cells[1, 30].Value = "โทรศัพท์บริษัท"; + summarySheet.Cells[1, 31].Value = "วุฒิที่ได้รับ"; + summarySheet.Cells[1, 32].Value = "สาขา/วิชาเอก"; + summarySheet.Cells[1, 33].Value = "คะแนนเฉลี่ยตลอดหลักสูตร"; + summarySheet.Cells[1, 34].Value = "ชื่อสถานศีกษา"; + summarySheet.Cells[1, 35].Value = "ระยะเวลาเริ่มศึกษา"; + summarySheet.Cells[1, 36].Value = "ระยะเวลาสิ้นสุดศึกษา"; + summarySheet.Cells[1, 37].Value = "สถานที่ทำงาน/ฝึกงาน"; + summarySheet.Cells[1, 38].Value = "ตำแหน่ง/ลักษณะงาน"; + summarySheet.Cells[1, 39].Value = "เงินเดือนสุดท้านก่อนออก"; + summarySheet.Cells[1, 40].Value = "ระยะเวลาเริ่มทำงาน/ฝึกงาน"; + summarySheet.Cells[1, 41].Value = "ระยะเวลาสิ้นสุดทำงาน/ฝึกงาน"; + summarySheet.Cells[1, 42].Value = "เหตุผลที่ออก"; + summarySheet.Cells[1, 43].Value = "ลำดับที่สอบได้"; + summarySheet.Cells[1, 44].Value = "เลขประจำตัวสอบ"; + summarySheet.Cells[1, 45].Value = "เลขที่นั่งสอบ"; + summarySheet.Cells[1, 46].Value = "คะแนนเต็มภาค ข"; + summarySheet.Cells[1, 47].Value = "คะแนนภาค ข"; + summarySheet.Cells[1, 48].Value = "ผลสอบภาค ข"; + summarySheet.Cells[1, 49].Value = "คะแนนเต็มภาค ค"; + summarySheet.Cells[1, 50].Value = "คะแนนภาค ค"; + summarySheet.Cells[1, 51].Value = "ผลสอบภาค ค"; + summarySheet.Cells[1, 52].Value = "ผลการสอบ"; + int row = 2; + + foreach (var item in candidates) + { + summarySheet.Cells[row, 1].Value = GenerateStatusCandidate(item.Status); + summarySheet.Cells[row, 2].Value = item.CitizenId; + summarySheet.Cells[row, 3].Value = item.FullName; + summarySheet.Cells[row, 4].Value = item.Nationality; + summarySheet.Cells[row, 5].Value = item.DateOfBirth; + summarySheet.Cells[row, 6].Value = item.Age; + summarySheet.Cells[row, 7].Value = item.RelationshipName; + summarySheet.Cells[row, 8].Value = item.Telephone; + summarySheet.Cells[row, 9].Value = item.MobilePhone; + summarySheet.Cells[row, 10].Value = item.Email; + summarySheet.Cells[row, 11].Value = item.Knowledge; + summarySheet.Cells[row, 12].Value = item.RegistAddress; + summarySheet.Cells[row, 13].Value = item.RegistProvinceName; + summarySheet.Cells[row, 14].Value = item.RegistDistrictName; + summarySheet.Cells[row, 15].Value = item.RegistSubDistrictName; + summarySheet.Cells[row, 16].Value = item.RegistZipCode; + summarySheet.Cells[row, 17].Value = item.CurrentAddress; + summarySheet.Cells[row, 18].Value = item.CurrentProvinceName; + summarySheet.Cells[row, 19].Value = item.CurrentDistrictName; + summarySheet.Cells[row, 20].Value = item.CurrentSubDistrictName; + summarySheet.Cells[row, 21].Value = item.CurrentZipCode; + summarySheet.Cells[row, 22].Value = item.MarryFullName; + summarySheet.Cells[row, 23].Value = item.FatherFullName; + summarySheet.Cells[row, 24].Value = item.MotherFullName; + summarySheet.Cells[row, 25].Value = GenerateStatusOccupation(item.OccupationType); + summarySheet.Cells[row, 26].Value = item.OccupationPosition; + summarySheet.Cells[row, 27].Value = item.OccupationCompany; + summarySheet.Cells[row, 28].Value = item.OccupationDepartment; + summarySheet.Cells[row, 29].Value = item.OccupationEmail; + summarySheet.Cells[row, 30].Value = item.OccupationTelephone; + + summarySheet.Cells[row, 43].Value = item.Number; + summarySheet.Cells[row, 44].Value = item.ExamIdenNumber; + summarySheet.Cells[row, 45].Value = item.SeatNumber; + summarySheet.Cells[row, 46].Value = item.PointTotalB; + summarySheet.Cells[row, 47].Value = item.PointB; + summarySheet.Cells[row, 48].Value = item.ResultB; + summarySheet.Cells[row, 49].Value = item.PointTotalC; + summarySheet.Cells[row, 50].Value = item.PointC; + summarySheet.Cells[row, 51].Value = item.ResultC; + summarySheet.Cells[row, 52].Value = item.Pass; + row++; + var educations = await _context.Educations + .AsQueryable() + .OrderBy(x => x.DurationStart) + .Where(x => x.Candidate.Id == item.Id) + .ToListAsync(); + + foreach (var education in educations) + { + summarySheet.Cells[row, 1].Value = GenerateStatusCandidate(item.Status); + summarySheet.Cells[row, 2].Value = item.CitizenId; + summarySheet.Cells[row, 3].Value = item.FullName; + summarySheet.Cells[row, 4].Value = item.Nationality; + summarySheet.Cells[row, 5].Value = item.DateOfBirth; + summarySheet.Cells[row, 6].Value = item.Age; + summarySheet.Cells[row, 7].Value = item.RelationshipName; + summarySheet.Cells[row, 8].Value = item.Telephone; + summarySheet.Cells[row, 9].Value = item.MobilePhone; + summarySheet.Cells[row, 10].Value = item.Email; + summarySheet.Cells[row, 11].Value = item.Knowledge; + summarySheet.Cells[row, 12].Value = item.RegistAddress; + summarySheet.Cells[row, 13].Value = item.RegistProvinceName; + summarySheet.Cells[row, 14].Value = item.RegistDistrictName; + summarySheet.Cells[row, 15].Value = item.RegistSubDistrictName; + summarySheet.Cells[row, 16].Value = item.RegistZipCode; + summarySheet.Cells[row, 17].Value = item.CurrentAddress; + summarySheet.Cells[row, 18].Value = item.CurrentProvinceName; + summarySheet.Cells[row, 19].Value = item.CurrentDistrictName; + summarySheet.Cells[row, 20].Value = item.CurrentSubDistrictName; + summarySheet.Cells[row, 21].Value = item.CurrentZipCode; + summarySheet.Cells[row, 22].Value = item.MarryFullName; + summarySheet.Cells[row, 23].Value = item.FatherFullName; + summarySheet.Cells[row, 24].Value = item.MotherFullName; + summarySheet.Cells[row, 25].Value = GenerateStatusOccupation(item.OccupationType); + summarySheet.Cells[row, 26].Value = item.OccupationPosition; + summarySheet.Cells[row, 27].Value = item.OccupationCompany; + summarySheet.Cells[row, 28].Value = item.OccupationDepartment; + summarySheet.Cells[row, 29].Value = item.OccupationEmail; + summarySheet.Cells[row, 30].Value = item.OccupationTelephone; + summarySheet.Cells[row, 31].Value = education.EducationLevelName; + summarySheet.Cells[row, 32].Value = education.Major; + summarySheet.Cells[row, 33].Value = education.Scores; + summarySheet.Cells[row, 34].Value = education.Name; + summarySheet.Cells[row, 35].Value = education.DurationStart == null ? "" : education.DurationStart.Date.ToThaiShortDate(); + summarySheet.Cells[row, 36].Value = education.DurationEnd == null ? "" : education.DurationEnd.Date.ToThaiShortDate(); + summarySheet.Cells[row, 43].Value = item.Number; + summarySheet.Cells[row, 44].Value = item.ExamIdenNumber; + summarySheet.Cells[row, 45].Value = item.SeatNumber; + summarySheet.Cells[row, 46].Value = item.PointTotalB; + summarySheet.Cells[row, 47].Value = item.PointB; + summarySheet.Cells[row, 48].Value = item.ResultB; + summarySheet.Cells[row, 49].Value = item.PointTotalC; + summarySheet.Cells[row, 50].Value = item.PointC; + summarySheet.Cells[row, 51].Value = item.ResultC; + summarySheet.Cells[row, 52].Value = item.Pass; + row++; + } + var careers = await _context.Careers + .AsQueryable() + .OrderBy(x => x.DurationStart) + .Where(x => x.Candidate.Id == item.Id) + .ToListAsync(); + + foreach (var career in careers) + { + summarySheet.Cells[row, 1].Value = GenerateStatusCandidate(item.Status); + summarySheet.Cells[row, 2].Value = item.CitizenId; + summarySheet.Cells[row, 3].Value = item.FullName; + summarySheet.Cells[row, 4].Value = item.Nationality; + summarySheet.Cells[row, 5].Value = item.DateOfBirth; + summarySheet.Cells[row, 6].Value = item.Age; + summarySheet.Cells[row, 7].Value = item.RelationshipName; + summarySheet.Cells[row, 8].Value = item.Telephone; + summarySheet.Cells[row, 9].Value = item.MobilePhone; + summarySheet.Cells[row, 10].Value = item.Email; + summarySheet.Cells[row, 11].Value = item.Knowledge; + summarySheet.Cells[row, 12].Value = item.RegistAddress; + summarySheet.Cells[row, 13].Value = item.RegistProvinceName; + summarySheet.Cells[row, 14].Value = item.RegistDistrictName; + summarySheet.Cells[row, 15].Value = item.RegistSubDistrictName; + summarySheet.Cells[row, 16].Value = item.RegistZipCode; + summarySheet.Cells[row, 17].Value = item.CurrentAddress; + summarySheet.Cells[row, 18].Value = item.CurrentProvinceName; + summarySheet.Cells[row, 19].Value = item.CurrentDistrictName; + summarySheet.Cells[row, 20].Value = item.CurrentSubDistrictName; + summarySheet.Cells[row, 21].Value = item.CurrentZipCode; + summarySheet.Cells[row, 22].Value = item.MarryFullName; + summarySheet.Cells[row, 23].Value = item.FatherFullName; + summarySheet.Cells[row, 24].Value = item.MotherFullName; + summarySheet.Cells[row, 25].Value = GenerateStatusOccupation(item.OccupationType); + summarySheet.Cells[row, 26].Value = item.OccupationPosition; + summarySheet.Cells[row, 27].Value = item.OccupationCompany; + summarySheet.Cells[row, 28].Value = item.OccupationDepartment; + summarySheet.Cells[row, 29].Value = item.OccupationEmail; + summarySheet.Cells[row, 30].Value = item.OccupationTelephone; + summarySheet.Cells[row, 37].Value = career.Name; + summarySheet.Cells[row, 38].Value = career.Position; + summarySheet.Cells[row, 39].Value = career.Salary; + summarySheet.Cells[row, 40].Value = career.DurationStart == null ? "" : career.DurationStart.Date.ToThaiShortDate(); + summarySheet.Cells[row, 41].Value = career.DurationEnd == null ? "" : career.DurationEnd.Date.ToThaiShortDate(); + summarySheet.Cells[row, 42].Value = career.Reason; + summarySheet.Cells[row, 43].Value = item.Number; + summarySheet.Cells[row, 44].Value = item.ExamIdenNumber; + summarySheet.Cells[row, 45].Value = item.SeatNumber; + summarySheet.Cells[row, 46].Value = item.PointTotalB; + summarySheet.Cells[row, 47].Value = item.PointB; + summarySheet.Cells[row, 48].Value = item.ResultB; + summarySheet.Cells[row, 49].Value = item.PointTotalC; + summarySheet.Cells[row, 50].Value = item.PointC; + summarySheet.Cells[row, 51].Value = item.ResultC; + summarySheet.Cells[row, 52].Value = item.Pass; + row++; + } + } + summarySheet.Cells[summarySheet.Dimension.Address].AutoFitColumns(); + package.Save(); + } + + stream.Position = 0; + return stream; + } + + // public async Task GetsDashboardExamAsync(string examId) + // { + // var periodExam = await _context.PeriodExams.AsQueryable() + // .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); + + // if (periodExam == null) + // throw new Exception(GlobalMessages.ExamNotFound); + + // var stream = new MemoryStream(); + // using (var package = new ExcelPackage(stream)) + // { + // var summarySheet = package.Workbook.Worksheets.Add("Dashboard"); + // summarySheet.TabColor = System.Drawing.Color.Black; + // // summarySheet.DefaultRowHeight = 17; + // summarySheet.Row(1).Style.Font.Bold = true; + // summarySheet.Cells[1, 1].Value = "จำนวนผู้สมัครคัดเลือกทั้งหมด"; + // summarySheet.Cells[1, 2].Value = "จำนวนผู้มีสิทธิ์เข้ารับคัดเลือกทั้งหมด"; + // summarySheet.Cells[1, 3].Value = "จำนวนผู้เข้ารับการคัดเลือกทั้งหมด"; + // summarySheet.Cells[1, 4].Value = "ผ่านการสอบ"; + // summarySheet.Cells[1, 5].Value = "ไม่ผ่านการสอบ"; + // summarySheet.Cells[1, 6].Value = "คะแนนภาค ข"; + // summarySheet.Cells[1, 7].Value = "ผลสอบภาค ข"; + // summarySheet.Cells[1, 8].Value = "คะแนนเต็มภาค ค"; + // summarySheet.Cells[1, 9].Value = "คะแนนภาค ค"; + // summarySheet.Cells[1, 10].Value = "ผลสอบภาค ค"; + // summarySheet.Cells[1, 11].Value = "ผลการสอบ"; + + // summarySheet.Cells[2, 1].Value = periodExam; + // summarySheet.Cells[2, 2].Value = periodExam; + // summarySheet.Cells[2, 3].Value = periodExam; + // summarySheet.Cells[2, 4].Value = periodExam; + // summarySheet.Cells[2, 5].Value = periodExam; + // summarySheet.Cells[2, 6].Value = periodExam; + // summarySheet.Cells[2, 7].Value = periodExam; + // summarySheet.Cells[2, 8].Value = periodExam; + // summarySheet.Cells[2, 9].Value = periodExam; + // summarySheet.Cells[2, 10].Value = periodExam; + // summarySheet.Cells[2, 11].Value = periodExam; + // summarySheet.Cells[summarySheet.Dimension.Address].AutoFitColumns(); + // package.Save(); + // } + + // stream.Position = 0; + // return stream; + // } #endregion } } diff --git a/obj/Debug/net7.0/project.razor.json b/obj/Debug/net7.0/project.razor.json index 65cce68..bfbbe29 100644 --- a/obj/Debug/net7.0/project.razor.json +++ b/obj/Debug/net7.0/project.razor.json @@ -13,7 +13,7 @@ "ProjectWorkspaceState": { "TagHelpers": [ { - "HashCode": 2081676829, + "HashCode": -403644031, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -97,7 +97,7 @@ } }, { - "HashCode": 346004782, + "HashCode": -1052124883, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -182,7 +182,7 @@ } }, { - "HashCode": -1670777527, + "HashCode": -530353816, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView.NotAuthorized", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -215,7 +215,7 @@ } }, { - "HashCode": -1018945572, + "HashCode": 873983129, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView.NotAuthorized", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -249,7 +249,7 @@ } }, { - "HashCode": -2140892405, + "HashCode": -399842103, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView.Authorizing", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -270,7 +270,7 @@ } }, { - "HashCode": -1128889671, + "HashCode": -557630960, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView.Authorizing", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -292,7 +292,7 @@ } }, { - "HashCode": -2085659867, + "HashCode": 855934930, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -397,7 +397,7 @@ } }, { - "HashCode": 1400785807, + "HashCode": 372365830, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -503,7 +503,7 @@ } }, { - "HashCode": 639571015, + "HashCode": -1851926698, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -536,7 +536,7 @@ } }, { - "HashCode": -501017717, + "HashCode": 730280587, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -570,7 +570,7 @@ } }, { - "HashCode": 216317047, + "HashCode": 429194723, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.NotAuthorized", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -603,7 +603,7 @@ } }, { - "HashCode": 1992494918, + "HashCode": -110889096, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.NotAuthorized", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -637,7 +637,7 @@ } }, { - "HashCode": -1854136408, + "HashCode": 1015784876, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Authorized", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -670,7 +670,7 @@ } }, { - "HashCode": -2104453711, + "HashCode": 584915280, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Authorized", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -704,7 +704,7 @@ } }, { - "HashCode": 175693560, + "HashCode": 1309771538, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Authorizing", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -725,7 +725,7 @@ } }, { - "HashCode": -627978665, + "HashCode": 257180498, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Authorizing", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -747,7 +747,7 @@ } }, { - "HashCode": -1591499227, + "HashCode": -1004498571, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -778,7 +778,7 @@ } }, { - "HashCode": -1243625562, + "HashCode": 1715844510, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -810,7 +810,7 @@ } }, { - "HashCode": -1549387614, + "HashCode": 1164225157, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -831,7 +831,7 @@ } }, { - "HashCode": -993401147, + "HashCode": 111091326, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Authorization", @@ -853,7 +853,7 @@ } }, { - "HashCode": -6245304, + "HashCode": -605802624, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.CascadingValue", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -928,7 +928,7 @@ } }, { - "HashCode": -464088369, + "HashCode": 1917377940, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.CascadingValue", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1004,7 +1004,7 @@ } }, { - "HashCode": -1258143494, + "HashCode": 149547570, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.CascadingValue.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1025,7 +1025,7 @@ } }, { - "HashCode": -1879307076, + "HashCode": -565906535, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.CascadingValue.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1047,7 +1047,7 @@ } }, { - "HashCode": -131045654, + "HashCode": -206494400, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.DynamicComponent", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1089,7 +1089,7 @@ } }, { - "HashCode": 450149574, + "HashCode": 1258266023, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.DynamicComponent", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1132,7 +1132,7 @@ } }, { - "HashCode": -533855180, + "HashCode": -941556201, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.LayoutView", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1174,7 +1174,7 @@ } }, { - "HashCode": -543756681, + "HashCode": -1953564926, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.LayoutView", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1217,7 +1217,7 @@ } }, { - "HashCode": 455270865, + "HashCode": 1639710753, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.LayoutView.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1238,7 +1238,7 @@ } }, { - "HashCode": 1164137044, + "HashCode": 463915096, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.LayoutView.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1260,7 +1260,7 @@ } }, { - "HashCode": -1100677957, + "HashCode": 1637282275, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.RouteView", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1302,7 +1302,7 @@ } }, { - "HashCode": 240054593, + "HashCode": 418295937, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.RouteView", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1345,7 +1345,7 @@ } }, { - "HashCode": 1834978560, + "HashCode": -2121246266, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.Router", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1453,7 +1453,7 @@ } }, { - "HashCode": 695521072, + "HashCode": 229038935, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.Router", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1562,7 +1562,7 @@ } }, { - "HashCode": -835910019, + "HashCode": -1403446853, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.Router.NotFound", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1583,7 +1583,7 @@ } }, { - "HashCode": -247356024, + "HashCode": -805537002, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.Router.NotFound", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1605,7 +1605,7 @@ } }, { - "HashCode": -1041053506, + "HashCode": 103663244, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.Router.Found", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1638,7 +1638,7 @@ } }, { - "HashCode": -106723364, + "HashCode": 1859028172, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.Router.Found", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1672,7 +1672,7 @@ } }, { - "HashCode": 861633314, + "HashCode": 530746682, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.Router.Navigating", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1693,7 +1693,7 @@ } }, { - "HashCode": 1413787590, + "HashCode": 1549037864, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.Router.Navigating", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -1715,7 +1715,7 @@ } }, { - "HashCode": -405727999, + "HashCode": -1841206331, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.DataAnnotationsValidator", "AssemblyName": "Microsoft.AspNetCore.Components.Forms", @@ -1734,7 +1734,7 @@ } }, { - "HashCode": -306758007, + "HashCode": 450492554, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.DataAnnotationsValidator", "AssemblyName": "Microsoft.AspNetCore.Components.Forms", @@ -1754,7 +1754,7 @@ } }, { - "HashCode": -29346077, + "HashCode": -456337034, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.EditForm", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -1859,7 +1859,7 @@ } }, { - "HashCode": -2143604898, + "HashCode": 1480667028, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.EditForm", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -1965,7 +1965,7 @@ } }, { - "HashCode": 1596665776, + "HashCode": -2039994340, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Forms.EditForm.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -1998,7 +1998,7 @@ } }, { - "HashCode": 233591418, + "HashCode": 661988106, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Forms.EditForm.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2032,7 +2032,7 @@ } }, { - "HashCode": 1995326546, + "HashCode": 1918938470, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputCheckbox", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2104,7 +2104,7 @@ } }, { - "HashCode": 573710373, + "HashCode": -1180327601, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputCheckbox", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2177,7 +2177,7 @@ } }, { - "HashCode": -894136037, + "HashCode": 1842451892, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputDate", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2285,7 +2285,7 @@ } }, { - "HashCode": 2004041456, + "HashCode": 349178699, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputDate", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2394,7 +2394,7 @@ } }, { - "HashCode": -1095347341, + "HashCode": 359244221, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputFile", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2436,7 +2436,7 @@ } }, { - "HashCode": -554221510, + "HashCode": 1582453713, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputFile", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2479,7 +2479,7 @@ } }, { - "HashCode": -854983299, + "HashCode": -1089012245, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputNumber", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2576,7 +2576,7 @@ } }, { - "HashCode": 1113402359, + "HashCode": -1794712319, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputNumber", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2674,7 +2674,7 @@ } }, { - "HashCode": -461255738, + "HashCode": 1496917117, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadio", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2738,7 +2738,7 @@ } }, { - "HashCode": 1403096413, + "HashCode": -1227628876, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadio", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2803,7 +2803,7 @@ } }, { - "HashCode": 438518422, + "HashCode": -403585815, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadioGroup", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -2911,7 +2911,7 @@ } }, { - "HashCode": -1947436975, + "HashCode": -875979234, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadioGroup", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3020,7 +3020,7 @@ } }, { - "HashCode": 1669403755, + "HashCode": 1886052410, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadioGroup.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3041,7 +3041,7 @@ } }, { - "HashCode": 1246313842, + "HashCode": -1386494293, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadioGroup.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3063,7 +3063,7 @@ } }, { - "HashCode": -1252275039, + "HashCode": 186205517, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputSelect", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3161,7 +3161,7 @@ } }, { - "HashCode": 24299941, + "HashCode": -1458716125, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputSelect", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3260,7 +3260,7 @@ } }, { - "HashCode": -1976244196, + "HashCode": -1564630451, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Forms.InputSelect.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3281,7 +3281,7 @@ } }, { - "HashCode": 2016884764, + "HashCode": 1003933586, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Forms.InputSelect.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3303,7 +3303,7 @@ } }, { - "HashCode": 2055691086, + "HashCode": 1111707791, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputText", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3375,7 +3375,7 @@ } }, { - "HashCode": -684258762, + "HashCode": 451825864, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputText", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3448,7 +3448,7 @@ } }, { - "HashCode": -1315490575, + "HashCode": 1567677172, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputTextArea", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3520,7 +3520,7 @@ } }, { - "HashCode": 1397460385, + "HashCode": -315429609, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.InputTextArea", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3593,7 +3593,7 @@ } }, { - "HashCode": -804502984, + "HashCode": 2051634376, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.ValidationMessage", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3647,7 +3647,7 @@ } }, { - "HashCode": 1921441431, + "HashCode": 353964366, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.ValidationMessage", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3702,7 +3702,7 @@ } }, { - "HashCode": 337417728, + "HashCode": -1599279862, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.ValidationSummary", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3743,7 +3743,7 @@ } }, { - "HashCode": 1371037490, + "HashCode": -1730444814, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Forms.ValidationSummary", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3785,7 +3785,7 @@ } }, { - "HashCode": 791876197, + "HashCode": 734282955, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.FocusOnNavigate", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3826,7 +3826,7 @@ } }, { - "HashCode": 1376306360, + "HashCode": 1724782497, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.FocusOnNavigate", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3868,7 +3868,7 @@ } }, { - "HashCode": -1215674909, + "HashCode": 1705643899, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.NavigationLock", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3910,7 +3910,7 @@ } }, { - "HashCode": -42463010, + "HashCode": -583383930, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.NavigationLock", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -3953,7 +3953,7 @@ } }, { - "HashCode": 979275311, + "HashCode": 1363845002, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.NavLink", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4016,7 +4016,7 @@ } }, { - "HashCode": 1024991974, + "HashCode": 1495850892, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Routing.NavLink", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4080,7 +4080,7 @@ } }, { - "HashCode": -1712210004, + "HashCode": 1934016966, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.NavLink.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4101,7 +4101,7 @@ } }, { - "HashCode": 424183173, + "HashCode": 1292957620, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Routing.NavLink.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4123,7 +4123,7 @@ } }, { - "HashCode": 772985644, + "HashCode": -605681588, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.HeadContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4155,7 +4155,7 @@ } }, { - "HashCode": 1916517798, + "HashCode": -2053080004, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.HeadContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4188,7 +4188,7 @@ } }, { - "HashCode": -1478364693, + "HashCode": 487284716, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.HeadContent.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4209,7 +4209,7 @@ } }, { - "HashCode": -87611030, + "HashCode": 510765672, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.HeadContent.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4231,7 +4231,7 @@ } }, { - "HashCode": 1995333518, + "HashCode": -997867845, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.HeadOutlet", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4250,7 +4250,7 @@ } }, { - "HashCode": -1018062538, + "HashCode": -631833707, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.HeadOutlet", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4270,7 +4270,7 @@ } }, { - "HashCode": -1948439494, + "HashCode": 2069856247, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.PageTitle", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4302,7 +4302,7 @@ } }, { - "HashCode": 1407579295, + "HashCode": -1582590489, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.PageTitle", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4335,7 +4335,7 @@ } }, { - "HashCode": 551174535, + "HashCode": -2144473933, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.PageTitle.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4356,7 +4356,7 @@ } }, { - "HashCode": -886697931, + "HashCode": 732929921, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.PageTitle.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4378,7 +4378,7 @@ } }, { - "HashCode": -1156604974, + "HashCode": -920052512, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.ErrorBoundary", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4441,7 +4441,7 @@ } }, { - "HashCode": 594308897, + "HashCode": 1549252772, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.ErrorBoundary", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4505,7 +4505,7 @@ } }, { - "HashCode": 1623428767, + "HashCode": -80888420, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.ErrorBoundary.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4526,7 +4526,7 @@ } }, { - "HashCode": 137259135, + "HashCode": -1019291008, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.ErrorBoundary.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4548,7 +4548,7 @@ } }, { - "HashCode": -894458600, + "HashCode": 1320826412, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.ErrorBoundary.ErrorContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4581,7 +4581,7 @@ } }, { - "HashCode": -754952013, + "HashCode": -737980426, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.ErrorBoundary.ErrorContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4615,7 +4615,7 @@ } }, { - "HashCode": -615777599, + "HashCode": 515795985, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4747,7 +4747,7 @@ } }, { - "HashCode": 2126980260, + "HashCode": -686306028, "Kind": "Components.Component", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4880,7 +4880,7 @@ } }, { - "HashCode": -331139959, + "HashCode": -697907966, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4913,7 +4913,7 @@ } }, { - "HashCode": -2052808597, + "HashCode": 2001640042, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ChildContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4947,7 +4947,7 @@ } }, { - "HashCode": -1448942897, + "HashCode": 223872858, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ItemContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -4980,7 +4980,7 @@ } }, { - "HashCode": 1793054426, + "HashCode": -641049626, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.ItemContent", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -5014,7 +5014,7 @@ } }, { - "HashCode": 878932778, + "HashCode": -1148968874, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.Placeholder", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -5047,7 +5047,7 @@ } }, { - "HashCode": -1821111443, + "HashCode": -95934708, "Kind": "Components.ChildContent", "Name": "Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.Placeholder", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -5081,7 +5081,7 @@ } }, { - "HashCode": 2038460915, + "HashCode": -558521019, "Kind": "Components.EventHandler", "Name": "onfocus", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5164,7 +5164,7 @@ } }, { - "HashCode": 1987129139, + "HashCode": 1680058601, "Kind": "Components.EventHandler", "Name": "onblur", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5247,7 +5247,7 @@ } }, { - "HashCode": -626417071, + "HashCode": 859196549, "Kind": "Components.EventHandler", "Name": "onfocusin", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5330,7 +5330,7 @@ } }, { - "HashCode": 1539590736, + "HashCode": 427562416, "Kind": "Components.EventHandler", "Name": "onfocusout", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5413,7 +5413,7 @@ } }, { - "HashCode": 1097603577, + "HashCode": -1636154973, "Kind": "Components.EventHandler", "Name": "onmouseover", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5496,7 +5496,7 @@ } }, { - "HashCode": -1428125586, + "HashCode": -267861617, "Kind": "Components.EventHandler", "Name": "onmouseout", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5579,7 +5579,7 @@ } }, { - "HashCode": 276911902, + "HashCode": 514159890, "Kind": "Components.EventHandler", "Name": "onmouseleave", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5662,7 +5662,7 @@ } }, { - "HashCode": -1145713167, + "HashCode": 622708900, "Kind": "Components.EventHandler", "Name": "onmouseenter", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5745,7 +5745,7 @@ } }, { - "HashCode": -1059361843, + "HashCode": 528401133, "Kind": "Components.EventHandler", "Name": "onmousemove", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5828,7 +5828,7 @@ } }, { - "HashCode": 299318611, + "HashCode": -539171274, "Kind": "Components.EventHandler", "Name": "onmousedown", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5911,7 +5911,7 @@ } }, { - "HashCode": -658764953, + "HashCode": -1165104589, "Kind": "Components.EventHandler", "Name": "onmouseup", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -5994,7 +5994,7 @@ } }, { - "HashCode": -1812829903, + "HashCode": -358982404, "Kind": "Components.EventHandler", "Name": "onclick", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6077,7 +6077,7 @@ } }, { - "HashCode": 479106318, + "HashCode": -718419896, "Kind": "Components.EventHandler", "Name": "ondblclick", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6160,7 +6160,7 @@ } }, { - "HashCode": -1242966944, + "HashCode": -424460645, "Kind": "Components.EventHandler", "Name": "onwheel", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6243,7 +6243,7 @@ } }, { - "HashCode": -84612755, + "HashCode": -111373241, "Kind": "Components.EventHandler", "Name": "onmousewheel", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6326,7 +6326,7 @@ } }, { - "HashCode": 1116606395, + "HashCode": 714317039, "Kind": "Components.EventHandler", "Name": "oncontextmenu", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6409,7 +6409,7 @@ } }, { - "HashCode": 1110062298, + "HashCode": -2006057189, "Kind": "Components.EventHandler", "Name": "ondrag", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6492,7 +6492,7 @@ } }, { - "HashCode": -724242723, + "HashCode": -1871695829, "Kind": "Components.EventHandler", "Name": "ondragend", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6575,7 +6575,7 @@ } }, { - "HashCode": -542292903, + "HashCode": -895429657, "Kind": "Components.EventHandler", "Name": "ondragenter", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6658,7 +6658,7 @@ } }, { - "HashCode": -1478212222, + "HashCode": -2131591350, "Kind": "Components.EventHandler", "Name": "ondragleave", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6741,7 +6741,7 @@ } }, { - "HashCode": -1771940836, + "HashCode": -636054247, "Kind": "Components.EventHandler", "Name": "ondragover", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6824,7 +6824,7 @@ } }, { - "HashCode": 1504715671, + "HashCode": 1337366910, "Kind": "Components.EventHandler", "Name": "ondragstart", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6907,7 +6907,7 @@ } }, { - "HashCode": 1253668181, + "HashCode": 93104868, "Kind": "Components.EventHandler", "Name": "ondrop", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -6990,7 +6990,7 @@ } }, { - "HashCode": 1016768881, + "HashCode": 27707611, "Kind": "Components.EventHandler", "Name": "onkeydown", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7073,7 +7073,7 @@ } }, { - "HashCode": -1111113184, + "HashCode": 159272421, "Kind": "Components.EventHandler", "Name": "onkeyup", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7156,7 +7156,7 @@ } }, { - "HashCode": -1249253159, + "HashCode": -173175328, "Kind": "Components.EventHandler", "Name": "onkeypress", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7239,7 +7239,7 @@ } }, { - "HashCode": 590824748, + "HashCode": 1881578217, "Kind": "Components.EventHandler", "Name": "onchange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7322,7 +7322,7 @@ } }, { - "HashCode": 725284201, + "HashCode": -300626315, "Kind": "Components.EventHandler", "Name": "oninput", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7405,7 +7405,7 @@ } }, { - "HashCode": 773167334, + "HashCode": 544722725, "Kind": "Components.EventHandler", "Name": "oninvalid", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7488,7 +7488,7 @@ } }, { - "HashCode": -196874771, + "HashCode": 302632292, "Kind": "Components.EventHandler", "Name": "onreset", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7571,7 +7571,7 @@ } }, { - "HashCode": 1612554594, + "HashCode": -341301979, "Kind": "Components.EventHandler", "Name": "onselect", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7654,7 +7654,7 @@ } }, { - "HashCode": 1713361340, + "HashCode": -1470911107, "Kind": "Components.EventHandler", "Name": "onselectstart", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7737,7 +7737,7 @@ } }, { - "HashCode": -867591226, + "HashCode": 997796541, "Kind": "Components.EventHandler", "Name": "onselectionchange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7820,7 +7820,7 @@ } }, { - "HashCode": -1703618187, + "HashCode": -654758228, "Kind": "Components.EventHandler", "Name": "onsubmit", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7903,7 +7903,7 @@ } }, { - "HashCode": 316413638, + "HashCode": -1783908866, "Kind": "Components.EventHandler", "Name": "onbeforecopy", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -7986,7 +7986,7 @@ } }, { - "HashCode": 2141064642, + "HashCode": 1741580937, "Kind": "Components.EventHandler", "Name": "onbeforecut", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8069,7 +8069,7 @@ } }, { - "HashCode": -1155352005, + "HashCode": -1604934310, "Kind": "Components.EventHandler", "Name": "onbeforepaste", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8152,7 +8152,7 @@ } }, { - "HashCode": 890957467, + "HashCode": 12669939, "Kind": "Components.EventHandler", "Name": "oncopy", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8235,7 +8235,7 @@ } }, { - "HashCode": -948477825, + "HashCode": 666648911, "Kind": "Components.EventHandler", "Name": "oncut", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8318,7 +8318,7 @@ } }, { - "HashCode": -1802660413, + "HashCode": -1538849787, "Kind": "Components.EventHandler", "Name": "onpaste", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8401,7 +8401,7 @@ } }, { - "HashCode": 289796803, + "HashCode": -1461966326, "Kind": "Components.EventHandler", "Name": "ontouchcancel", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8484,7 +8484,7 @@ } }, { - "HashCode": -922338102, + "HashCode": 620435560, "Kind": "Components.EventHandler", "Name": "ontouchend", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8567,7 +8567,7 @@ } }, { - "HashCode": -180143010, + "HashCode": 1821927482, "Kind": "Components.EventHandler", "Name": "ontouchmove", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8650,7 +8650,7 @@ } }, { - "HashCode": -2131399182, + "HashCode": -1168456536, "Kind": "Components.EventHandler", "Name": "ontouchstart", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8733,7 +8733,7 @@ } }, { - "HashCode": -2095598537, + "HashCode": 1503022013, "Kind": "Components.EventHandler", "Name": "ontouchenter", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8816,7 +8816,7 @@ } }, { - "HashCode": 1330391387, + "HashCode": -721611332, "Kind": "Components.EventHandler", "Name": "ontouchleave", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8899,7 +8899,7 @@ } }, { - "HashCode": -1685552946, + "HashCode": -1549559035, "Kind": "Components.EventHandler", "Name": "ongotpointercapture", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -8982,7 +8982,7 @@ } }, { - "HashCode": -490141006, + "HashCode": -799418374, "Kind": "Components.EventHandler", "Name": "onlostpointercapture", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9065,7 +9065,7 @@ } }, { - "HashCode": -1693790056, + "HashCode": -369663948, "Kind": "Components.EventHandler", "Name": "onpointercancel", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9148,7 +9148,7 @@ } }, { - "HashCode": -1997200135, + "HashCode": 2062721802, "Kind": "Components.EventHandler", "Name": "onpointerdown", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9231,7 +9231,7 @@ } }, { - "HashCode": 32082492, + "HashCode": -1567537601, "Kind": "Components.EventHandler", "Name": "onpointerenter", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9314,7 +9314,7 @@ } }, { - "HashCode": -1403180601, + "HashCode": 909533879, "Kind": "Components.EventHandler", "Name": "onpointerleave", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9397,7 +9397,7 @@ } }, { - "HashCode": -387164874, + "HashCode": -715128288, "Kind": "Components.EventHandler", "Name": "onpointermove", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9480,7 +9480,7 @@ } }, { - "HashCode": 726748747, + "HashCode": -1173517377, "Kind": "Components.EventHandler", "Name": "onpointerout", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9563,7 +9563,7 @@ } }, { - "HashCode": 317034729, + "HashCode": 1225943928, "Kind": "Components.EventHandler", "Name": "onpointerover", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9646,7 +9646,7 @@ } }, { - "HashCode": 123393129, + "HashCode": 831709681, "Kind": "Components.EventHandler", "Name": "onpointerup", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9729,7 +9729,7 @@ } }, { - "HashCode": 1836381529, + "HashCode": 15410109, "Kind": "Components.EventHandler", "Name": "oncanplay", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9812,7 +9812,7 @@ } }, { - "HashCode": -1718270703, + "HashCode": -932357185, "Kind": "Components.EventHandler", "Name": "oncanplaythrough", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9895,7 +9895,7 @@ } }, { - "HashCode": -314240633, + "HashCode": 524524694, "Kind": "Components.EventHandler", "Name": "oncuechange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -9978,7 +9978,7 @@ } }, { - "HashCode": 901575131, + "HashCode": 1674540494, "Kind": "Components.EventHandler", "Name": "ondurationchange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10061,7 +10061,7 @@ } }, { - "HashCode": -693427021, + "HashCode": 1959319945, "Kind": "Components.EventHandler", "Name": "onemptied", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10144,7 +10144,7 @@ } }, { - "HashCode": 462597524, + "HashCode": -238946481, "Kind": "Components.EventHandler", "Name": "onpause", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10227,7 +10227,7 @@ } }, { - "HashCode": 1628664129, + "HashCode": 269398308, "Kind": "Components.EventHandler", "Name": "onplay", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10310,7 +10310,7 @@ } }, { - "HashCode": 2043897661, + "HashCode": -1483645426, "Kind": "Components.EventHandler", "Name": "onplaying", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10393,7 +10393,7 @@ } }, { - "HashCode": -609228764, + "HashCode": -2001672377, "Kind": "Components.EventHandler", "Name": "onratechange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10476,7 +10476,7 @@ } }, { - "HashCode": 245426277, + "HashCode": -477369882, "Kind": "Components.EventHandler", "Name": "onseeked", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10559,7 +10559,7 @@ } }, { - "HashCode": -1560204749, + "HashCode": 672868378, "Kind": "Components.EventHandler", "Name": "onseeking", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10642,7 +10642,7 @@ } }, { - "HashCode": -447489344, + "HashCode": -1611307856, "Kind": "Components.EventHandler", "Name": "onstalled", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10725,7 +10725,7 @@ } }, { - "HashCode": -1460256074, + "HashCode": 760888029, "Kind": "Components.EventHandler", "Name": "onstop", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10808,7 +10808,7 @@ } }, { - "HashCode": 913574071, + "HashCode": 770961369, "Kind": "Components.EventHandler", "Name": "onsuspend", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10891,7 +10891,7 @@ } }, { - "HashCode": -2140798459, + "HashCode": 1717925540, "Kind": "Components.EventHandler", "Name": "ontimeupdate", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -10974,7 +10974,7 @@ } }, { - "HashCode": -46544103, + "HashCode": 1645086781, "Kind": "Components.EventHandler", "Name": "onvolumechange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11057,7 +11057,7 @@ } }, { - "HashCode": 2035332419, + "HashCode": -903504188, "Kind": "Components.EventHandler", "Name": "onwaiting", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11140,7 +11140,7 @@ } }, { - "HashCode": -2013440196, + "HashCode": -786805323, "Kind": "Components.EventHandler", "Name": "onloadstart", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11223,7 +11223,7 @@ } }, { - "HashCode": -459853570, + "HashCode": -460769901, "Kind": "Components.EventHandler", "Name": "ontimeout", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11306,7 +11306,7 @@ } }, { - "HashCode": 694805951, + "HashCode": -1933470819, "Kind": "Components.EventHandler", "Name": "onabort", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11389,7 +11389,7 @@ } }, { - "HashCode": 629029908, + "HashCode": 860721338, "Kind": "Components.EventHandler", "Name": "onload", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11472,7 +11472,7 @@ } }, { - "HashCode": -1415577618, + "HashCode": -202459100, "Kind": "Components.EventHandler", "Name": "onloadend", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11555,7 +11555,7 @@ } }, { - "HashCode": 584905259, + "HashCode": 329474504, "Kind": "Components.EventHandler", "Name": "onprogress", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11638,7 +11638,7 @@ } }, { - "HashCode": 538928332, + "HashCode": -1896384038, "Kind": "Components.EventHandler", "Name": "onerror", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11721,7 +11721,7 @@ } }, { - "HashCode": 229153778, + "HashCode": -531782826, "Kind": "Components.EventHandler", "Name": "onactivate", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11804,7 +11804,7 @@ } }, { - "HashCode": 1935499140, + "HashCode": 1523489908, "Kind": "Components.EventHandler", "Name": "onbeforeactivate", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11887,7 +11887,7 @@ } }, { - "HashCode": 1629660443, + "HashCode": 33558515, "Kind": "Components.EventHandler", "Name": "onbeforedeactivate", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -11970,7 +11970,7 @@ } }, { - "HashCode": -301410340, + "HashCode": 980679684, "Kind": "Components.EventHandler", "Name": "ondeactivate", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12053,7 +12053,7 @@ } }, { - "HashCode": 664451619, + "HashCode": 1071713625, "Kind": "Components.EventHandler", "Name": "onended", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12136,7 +12136,7 @@ } }, { - "HashCode": 1001208894, + "HashCode": 488202, "Kind": "Components.EventHandler", "Name": "onfullscreenchange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12219,7 +12219,7 @@ } }, { - "HashCode": 1526638117, + "HashCode": 1529425939, "Kind": "Components.EventHandler", "Name": "onfullscreenerror", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12302,7 +12302,7 @@ } }, { - "HashCode": 1500797058, + "HashCode": -874380512, "Kind": "Components.EventHandler", "Name": "onloadeddata", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12385,7 +12385,7 @@ } }, { - "HashCode": 397224947, + "HashCode": -751843414, "Kind": "Components.EventHandler", "Name": "onloadedmetadata", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12468,7 +12468,7 @@ } }, { - "HashCode": 1535329009, + "HashCode": 1489401757, "Kind": "Components.EventHandler", "Name": "onpointerlockchange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12551,7 +12551,7 @@ } }, { - "HashCode": -2141122381, + "HashCode": 1591265925, "Kind": "Components.EventHandler", "Name": "onpointerlockerror", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12634,7 +12634,7 @@ } }, { - "HashCode": -450340091, + "HashCode": 1762595880, "Kind": "Components.EventHandler", "Name": "onreadystatechange", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12717,7 +12717,7 @@ } }, { - "HashCode": 887235146, + "HashCode": 236306235, "Kind": "Components.EventHandler", "Name": "onscroll", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12800,7 +12800,7 @@ } }, { - "HashCode": -1584128217, + "HashCode": -1020416387, "Kind": "Components.EventHandler", "Name": "ontoggle", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12883,7 +12883,7 @@ } }, { - "HashCode": -779626599, + "HashCode": -1429146420, "Kind": "Components.Splat", "Name": "Attributes", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -12922,7 +12922,7 @@ } }, { - "HashCode": 2099261713, + "HashCode": 157217141, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.Razor", @@ -13239,7 +13239,7 @@ } }, { - "HashCode": 2111933177, + "HashCode": -63532121, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -13438,7 +13438,7 @@ } }, { - "HashCode": -1466621044, + "HashCode": -817597798, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -13567,7 +13567,7 @@ } }, { - "HashCode": -1934388001, + "HashCode": -2101029205, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -13624,7 +13624,7 @@ } }, { - "HashCode": -1200524366, + "HashCode": -991186942, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.DistributedCacheTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -13758,7 +13758,7 @@ } }, { - "HashCode": -1427489436, + "HashCode": -733914904, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.EnvironmentTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -13806,7 +13806,7 @@ } }, { - "HashCode": 1358825369, + "HashCode": -2113788731, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.FormActionTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14225,7 +14225,7 @@ } }, { - "HashCode": 104452635, + "HashCode": -1616929680, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14329,7 +14329,7 @@ } }, { - "HashCode": 633573626, + "HashCode": -761130292, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.ImageTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14377,7 +14377,7 @@ } }, { - "HashCode": 134890435, + "HashCode": 396052397, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14449,7 +14449,7 @@ } }, { - "HashCode": 1622630338, + "HashCode": 1490260842, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14484,7 +14484,7 @@ } }, { - "HashCode": 1260792283, + "HashCode": -781409868, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.LinkTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14682,7 +14682,7 @@ } }, { - "HashCode": 940359883, + "HashCode": 99105687, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.OptionTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14712,7 +14712,7 @@ } }, { - "HashCode": -1340165436, + "HashCode": 1927336660, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14795,7 +14795,7 @@ } }, { - "HashCode": -1389419223, + "HashCode": -1447596851, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.PersistComponentStateTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14826,7 +14826,7 @@ } }, { - "HashCode": -433978978, + "HashCode": -360487731, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -14981,7 +14981,7 @@ } }, { - "HashCode": -815406322, + "HashCode": 290097230, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -15042,7 +15042,7 @@ } }, { - "HashCode": 1611935648, + "HashCode": 24628147, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.TextAreaTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -15086,7 +15086,7 @@ } }, { - "HashCode": 103729772, + "HashCode": -1572280545, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -15121,7 +15121,7 @@ } }, { - "HashCode": 1373951218, + "HashCode": -1454080890, "Kind": "ITagHelper", "Name": "Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper", "AssemblyName": "Microsoft.AspNetCore.Mvc.TagHelpers", @@ -15157,7 +15157,7 @@ } }, { - "HashCode": -156527756, + "HashCode": -773029497, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -15253,7 +15253,7 @@ } }, { - "HashCode": 2129084892, + "HashCode": -2139716899, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -15375,7 +15375,7 @@ } }, { - "HashCode": -963920701, + "HashCode": 1429233871, "Kind": "Components.Bind", "Name": "Bind_value", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -15497,7 +15497,7 @@ } }, { - "HashCode": -428911391, + "HashCode": -1232291746, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -15630,7 +15630,7 @@ } }, { - "HashCode": 617054832, + "HashCode": 750869459, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -15763,7 +15763,7 @@ } }, { - "HashCode": -340028708, + "HashCode": -1236641001, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -15896,7 +15896,7 @@ } }, { - "HashCode": 190669240, + "HashCode": -2278989, "Kind": "Components.Bind", "Name": "Bind_value", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16029,7 +16029,7 @@ } }, { - "HashCode": 690210964, + "HashCode": 1507329651, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16162,7 +16162,7 @@ } }, { - "HashCode": 482902309, + "HashCode": 1379896115, "Kind": "Components.Bind", "Name": "Bind_value", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16295,7 +16295,7 @@ } }, { - "HashCode": 242253202, + "HashCode": 1342078751, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16428,7 +16428,7 @@ } }, { - "HashCode": 695725905, + "HashCode": 1685208011, "Kind": "Components.Bind", "Name": "Bind_value", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16561,7 +16561,7 @@ } }, { - "HashCode": 413631553, + "HashCode": -1240077581, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16694,7 +16694,7 @@ } }, { - "HashCode": 1759291571, + "HashCode": -1945363486, "Kind": "Components.Bind", "Name": "Bind_value", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16827,7 +16827,7 @@ } }, { - "HashCode": 899346001, + "HashCode": -1577548921, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -16960,7 +16960,7 @@ } }, { - "HashCode": 466230661, + "HashCode": 1567589349, "Kind": "Components.Bind", "Name": "Bind_value", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -17093,7 +17093,7 @@ } }, { - "HashCode": 1139363553, + "HashCode": 725299669, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -17215,7 +17215,7 @@ } }, { - "HashCode": -1461738371, + "HashCode": -750263638, "Kind": "Components.Bind", "Name": "Bind", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -17337,7 +17337,7 @@ } }, { - "HashCode": -1276164844, + "HashCode": 167497700, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputCheckbox", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -17424,7 +17424,7 @@ } }, { - "HashCode": -2072615030, + "HashCode": -1744793806, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputCheckbox", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -17512,7 +17512,7 @@ } }, { - "HashCode": -636295242, + "HashCode": -2098212168, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputDate", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -17599,7 +17599,7 @@ } }, { - "HashCode": 488707580, + "HashCode": 1706029513, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputDate", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -17687,7 +17687,7 @@ } }, { - "HashCode": -795395359, + "HashCode": 753188913, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputNumber", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -17774,7 +17774,7 @@ } }, { - "HashCode": -15840170, + "HashCode": -1413900249, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputNumber", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -17862,7 +17862,7 @@ } }, { - "HashCode": 725413044, + "HashCode": 676123531, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadioGroup", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -17949,7 +17949,7 @@ } }, { - "HashCode": 1195201554, + "HashCode": 1128109341, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputRadioGroup", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -18037,7 +18037,7 @@ } }, { - "HashCode": -221165532, + "HashCode": 342057138, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputSelect", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -18124,7 +18124,7 @@ } }, { - "HashCode": -617294643, + "HashCode": 1653419606, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputSelect", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -18212,7 +18212,7 @@ } }, { - "HashCode": 927105165, + "HashCode": -1485395098, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputText", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -18299,7 +18299,7 @@ } }, { - "HashCode": 494740310, + "HashCode": 861990996, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputText", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -18387,7 +18387,7 @@ } }, { - "HashCode": 1579160935, + "HashCode": -18538190, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputTextArea", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -18474,7 +18474,7 @@ } }, { - "HashCode": 2102495744, + "HashCode": 1816187139, "Kind": "Components.Bind", "Name": "Microsoft.AspNetCore.Components.Forms.InputTextArea", "AssemblyName": "Microsoft.AspNetCore.Components.Web", @@ -18562,7 +18562,7 @@ } }, { - "HashCode": 1987253669, + "HashCode": -697305239, "Kind": "Components.Ref", "Name": "Ref", "AssemblyName": "Microsoft.AspNetCore.Components", @@ -18601,7 +18601,7 @@ } }, { - "HashCode": 1505072830, + "HashCode": -1808523259, "Kind": "Components.Key", "Name": "Key", "AssemblyName": "Microsoft.AspNetCore.Components", diff --git a/obj/project.assets.json b/obj/project.assets.json index adb4b57..29e508d 100644 --- a/obj/project.assets.json +++ b/obj/project.assets.json @@ -49,6 +49,19 @@ "lib/net7.0/BMA.EHR.Extensions.dll": {} } }, + "BouncyCastle.NetCore/1.9.0": { + "type": "package", + "compile": { + "lib/netstandard2.0/BouncyCastle.Crypto.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/BouncyCastle.Crypto.dll": { + "related": ".xml" + } + } + }, "Elasticsearch.Net/7.17.5": { "type": "package", "dependencies": { @@ -1263,10 +1276,10 @@ "buildTransitive/net6.0/_._": {} } }, - "Microsoft.Extensions.Configuration.Binder/2.0.0": { + "Microsoft.Extensions.Configuration.Binder/6.0.0": { "type": "package", "dependencies": { - "Microsoft.Extensions.Configuration": "2.0.0" + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0" }, "compile": { "lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll": { @@ -1471,6 +1484,25 @@ } } }, + "Microsoft.Extensions.Http/6.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Http.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Http.dll": { + "related": ".xml" + } + } + }, "Microsoft.Extensions.Localization/2.2.0": { "type": "package", "dependencies": { @@ -1541,6 +1573,29 @@ "buildTransitive/net6.0/Microsoft.Extensions.Logging.Abstractions.targets": {} } }, + "Microsoft.Extensions.Logging.Configuration/6.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Configuration": "6.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Configuration.Binder": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "Microsoft.Extensions.Options.ConfigurationExtensions": "6.0.0" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Logging.Configuration.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Logging.Configuration.dll": { + "related": ".xml" + } + } + }, "Microsoft.Extensions.ObjectPool/2.2.0": { "type": "package", "compile": { @@ -1574,6 +1629,26 @@ "buildTransitive/net6.0/_._": {} } }, + "Microsoft.Extensions.Options.ConfigurationExtensions/6.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Configuration.Binder": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll": { + "related": ".xml" + } + } + }, "Microsoft.Extensions.Primitives/7.0.0": { "type": "package", "compile": { @@ -1875,6 +1950,59 @@ } } }, + "Sentry/3.30.0": { + "type": "package", + "compile": { + "lib/net6.0/Sentry.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Sentry.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/Sentry.targets": {} + } + }, + "Sentry.AspNetCore/3.30.0": { + "type": "package", + "dependencies": { + "Sentry.Extensions.Logging": "3.30.0" + }, + "compile": { + "lib/net6.0/Sentry.AspNetCore.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Sentry.AspNetCore.dll": { + "related": ".xml" + } + }, + "frameworkReferences": [ + "Microsoft.AspNetCore.App" + ] + }, + "Sentry.Extensions.Logging/3.30.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Http": "6.0.0", + "Microsoft.Extensions.Logging.Configuration": "6.0.0", + "Sentry": "3.30.0" + }, + "compile": { + "lib/net6.0/Sentry.Extensions.Logging.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Sentry.Extensions.Logging.dll": { + "related": ".xml" + } + } + }, "Serilog/2.12.0": { "type": "package", "compile": { @@ -3003,6 +3131,21 @@ "lib/net7.0/BMA.EHR.Extensions.dll" ] }, + "BouncyCastle.NetCore/1.9.0": { + "sha512": "FpWfsqjMp+RNavLqMlviDPlbdf7q4j/pr9SHfc1LKcZz5PRjciuYo59nFnw+eJi+H8cm0eH5uVZStwAv1LRdCw==", + "type": "package", + "path": "bouncycastle.netcore/1.9.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "bouncycastle.netcore.1.9.0.nupkg.sha512", + "bouncycastle.netcore.nuspec", + "lib/net20/BouncyCastle.Crypto.dll", + "lib/net20/BouncyCastle.Crypto.xml", + "lib/netstandard2.0/BouncyCastle.Crypto.dll", + "lib/netstandard2.0/BouncyCastle.Crypto.xml" + ] + }, "Elasticsearch.Net/7.17.5": { "sha512": "orChsQi1Ceho/NyIylNOn6y4vuGcsbCfMZnCueNN0fzqYEGQmQdPfcVmsR5+3fwpXTgxCdjTUVmqOwvHpCSB+Q==", "type": "package", @@ -4466,17 +4609,23 @@ "useSharedDesignerContext.txt" ] }, - "Microsoft.Extensions.Configuration.Binder/2.0.0": { - "sha512": "IznHHzGUtrdpuQqIUdmzF6TYPcsYHONhHh3o9dGp39sX/9Zfmt476UnhvU0UhXgJnXXAikt/MpN6AuSLCCMdEQ==", + "Microsoft.Extensions.Configuration.Binder/6.0.0": { + "sha512": "b3ErKzND8LIC7o08QAVlKfaEIYEvLJbtmVbFZVBRXeu9YkKfSSzLZfR1SUfQPBIy9mKLhEtJgGYImkcMNaKE0A==", "type": "package", - "path": "microsoft.extensions.configuration.binder/2.0.0", + "path": "microsoft.extensions.configuration.binder/6.0.0", "files": [ ".nupkg.metadata", ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Configuration.Binder.dll", + "lib/net461/Microsoft.Extensions.Configuration.Binder.xml", "lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll", "lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.xml", - "microsoft.extensions.configuration.binder.2.0.0.nupkg.sha512", - "microsoft.extensions.configuration.binder.nuspec" + "microsoft.extensions.configuration.binder.6.0.0.nupkg.sha512", + "microsoft.extensions.configuration.binder.nuspec", + "useSharedDesignerContext.txt" ] }, "Microsoft.Extensions.Configuration.FileExtensions/7.0.0": { @@ -4731,6 +4880,25 @@ "microsoft.extensions.hosting.abstractions.nuspec" ] }, + "Microsoft.Extensions.Http/6.0.0": { + "sha512": "15+pa2G0bAMHbHewaQIdr/y6ag2H3yh4rd9hTXavtWDzQBkvpe2RMqFg8BxDpcQWssmjmBApGPcw93QRz6YcMg==", + "type": "package", + "path": "microsoft.extensions.http/6.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Http.dll", + "lib/net461/Microsoft.Extensions.Http.xml", + "lib/netstandard2.0/Microsoft.Extensions.Http.dll", + "lib/netstandard2.0/Microsoft.Extensions.Http.xml", + "microsoft.extensions.http.6.0.0.nupkg.sha512", + "microsoft.extensions.http.nuspec", + "useSharedDesignerContext.txt" + ] + }, "Microsoft.Extensions.Localization/2.2.0": { "sha512": "3nBQLeBrcd4Rgd9vQi4gF5NgAWxnQrHekjjwlgww4wyLNfJDizjiex2resOLoAuAgy3y2IIAWjOpbr0UKR2ykw==", "type": "package", @@ -4856,6 +5024,25 @@ "useSharedDesignerContext.txt" ] }, + "Microsoft.Extensions.Logging.Configuration/6.0.0": { + "sha512": "ZDskjagmBAbv+K8rYW9VhjPplhbOE63xUD0DiuydZJwt15dRyoqicYklLd86zzeintUc7AptDkHn+YhhYkYo8A==", + "type": "package", + "path": "microsoft.extensions.logging.configuration/6.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Logging.Configuration.dll", + "lib/net461/Microsoft.Extensions.Logging.Configuration.xml", + "lib/netstandard2.0/Microsoft.Extensions.Logging.Configuration.dll", + "lib/netstandard2.0/Microsoft.Extensions.Logging.Configuration.xml", + "microsoft.extensions.logging.configuration.6.0.0.nupkg.sha512", + "microsoft.extensions.logging.configuration.nuspec", + "useSharedDesignerContext.txt" + ] + }, "Microsoft.Extensions.ObjectPool/2.2.0": { "sha512": "gA8H7uQOnM5gb+L0uTNjViHYr+hRDqCdfugheGo/MxQnuHzmhhzCBTIPm19qL1z1Xe0NEMabfcOBGv9QghlZ8g==", "type": "package", @@ -4898,6 +5085,25 @@ "useSharedDesignerContext.txt" ] }, + "Microsoft.Extensions.Options.ConfigurationExtensions/6.0.0": { + "sha512": "bXWINbTn0vC0FYc9GaQTISbxhQLAMrvtbuvD9N6JelEaIS/Pr62wUCinrq5bf1WRBGczt1v4wDhxFtVFNcMdUQ==", + "type": "package", + "path": "microsoft.extensions.options.configurationextensions/6.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Options.ConfigurationExtensions.dll", + "lib/net461/Microsoft.Extensions.Options.ConfigurationExtensions.xml", + "lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll", + "lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.xml", + "microsoft.extensions.options.configurationextensions.6.0.0.nupkg.sha512", + "microsoft.extensions.options.configurationextensions.nuspec", + "useSharedDesignerContext.txt" + ] + }, "Microsoft.Extensions.Primitives/7.0.0": { "sha512": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==", "type": "package", @@ -5370,6 +5576,89 @@ "pomelo.entityframeworkcore.mysql.nuspec" ] }, + "Sentry/3.30.0": { + "sha512": "BfhnWf/NbMW+6RVrNZ8bH40YG6QSb01Dt50/BbPIb0W23Wya0tb8QSyX2990nU3DIqrhxqENajgBNDEo868CNw==", + "type": "package", + "path": "sentry/3.30.0", + "hasTools": true, + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "README.md", + "build/Sentry.targets", + "buildTransitive/Sentry.targets", + "lib/net461/Sentry.dll", + "lib/net461/Sentry.xml", + "lib/net5.0/Sentry.dll", + "lib/net5.0/Sentry.xml", + "lib/net6.0-android31.0/Sentry.dll", + "lib/net6.0-android31.0/Sentry.xml", + "lib/net6.0-ios16.1/Sentry.dll", + "lib/net6.0-ios16.1/Sentry.xml", + "lib/net6.0-maccatalyst16.1/Sentry.dll", + "lib/net6.0-maccatalyst16.1/Sentry.xml", + "lib/net6.0/Sentry.dll", + "lib/net6.0/Sentry.xml", + "lib/netcoreapp3.0/Sentry.dll", + "lib/netcoreapp3.0/Sentry.xml", + "lib/netstandard2.0/Sentry.dll", + "lib/netstandard2.0/Sentry.xml", + "lib/netstandard2.1/Sentry.dll", + "lib/netstandard2.1/Sentry.xml", + "sentry-nuget.png", + "sentry.3.30.0.nupkg.sha512", + "sentry.nuspec", + "tools/sentry-cli-Darwin-arm64", + "tools/sentry-cli-Darwin-x86_64", + "tools/sentry-cli-Linux-aarch64", + "tools/sentry-cli-Linux-i686", + "tools/sentry-cli-Linux-x86_64", + "tools/sentry-cli-Windows-i686.exe", + "tools/sentry-cli-Windows-x86_64.exe" + ] + }, + "Sentry.AspNetCore/3.30.0": { + "sha512": "EpXvQQ6UbOQkyOwL0TNjXBBO0sK+XRETf8Oq6EdtmXdQuTfaLC48kqSXk3pxugBCqIxU/kT7fXd12rPkFG9EMA==", + "type": "package", + "path": "sentry.aspnetcore/3.30.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "README.md", + "lib/net5.0/Sentry.AspNetCore.dll", + "lib/net5.0/Sentry.AspNetCore.xml", + "lib/net6.0/Sentry.AspNetCore.dll", + "lib/net6.0/Sentry.AspNetCore.xml", + "lib/netcoreapp3.0/Sentry.AspNetCore.dll", + "lib/netcoreapp3.0/Sentry.AspNetCore.xml", + "lib/netstandard2.0/Sentry.AspNetCore.dll", + "lib/netstandard2.0/Sentry.AspNetCore.xml", + "sentry-nuget.png", + "sentry.aspnetcore.3.30.0.nupkg.sha512", + "sentry.aspnetcore.nuspec" + ] + }, + "Sentry.Extensions.Logging/3.30.0": { + "sha512": "tykAR21+TvzGT4/YnWB3HDKFQ0Vv+/9t//r/QDCyWN/9lzDseShXsK98Th66l/b4b1wOdYgDRfH3Dj0b6RikhQ==", + "type": "package", + "path": "sentry.extensions.logging/3.30.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "README.md", + "lib/net5.0/Sentry.Extensions.Logging.dll", + "lib/net5.0/Sentry.Extensions.Logging.xml", + "lib/net6.0/Sentry.Extensions.Logging.dll", + "lib/net6.0/Sentry.Extensions.Logging.xml", + "lib/netcoreapp3.0/Sentry.Extensions.Logging.dll", + "lib/netcoreapp3.0/Sentry.Extensions.Logging.xml", + "lib/netstandard2.0/Sentry.Extensions.Logging.dll", + "lib/netstandard2.0/Sentry.Extensions.Logging.xml", + "sentry-nuget.png", + "sentry.extensions.logging.3.30.0.nupkg.sha512", + "sentry.extensions.logging.nuspec" + ] + }, "Serilog/2.12.0": { "sha512": "xaiJLIdu6rYMKfQMYUZgTy8YK7SMZjB4Yk50C/u//Z4OsvxkUfSPJy4nknfvwAC34yr13q7kcyh4grbwhSxyZg==", "type": "package", @@ -8112,6 +8401,7 @@ "AWSSDK.S3 >= 3.7.103.39", "BMA.EHR.Core >= 1.0.0", "BMA.EHR.Extensions >= 1.0.1", + "BouncyCastle.NetCore >= 1.9.0", "EPPlus >= 6.1.3", "EPPlus.Interfaces >= 6.1.1", "EPPlus.System.Drawing >= 6.1.1", @@ -8138,6 +8428,7 @@ "Microsoft.EntityFrameworkCore.Tools >= 7.0.4", "Microsoft.VisualStudio.Azure.Containers.Tools.Targets >= 1.17.0", "Pomelo.EntityFrameworkCore.MySql >= 7.0.0", + "Sentry.AspNetCore >= 3.30.0", "Serilog >= 2.12.0", "Serilog.AspNetCore >= 6.1.0", "Serilog.Enrichers.Environment >= 2.2.0", @@ -8222,6 +8513,10 @@ "target": "Package", "version": "[1.0.1, )" }, + "BouncyCastle.NetCore": { + "target": "Package", + "version": "[1.9.0, )" + }, "EPPlus": { "target": "Package", "version": "[6.1.3, )" @@ -8328,6 +8623,10 @@ "target": "Package", "version": "[7.0.0, )" }, + "Sentry.AspNetCore": { + "target": "Package", + "version": "[3.30.0, )" + }, "Serilog": { "target": "Package", "version": "[2.12.0, )" diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache index f6c02c8..e4ea957 100644 --- a/obj/project.nuget.cache +++ b/obj/project.nuget.cache @@ -1,6 +1,6 @@ { "version": 2, - "dgSpecHash": "UamAJ+luCR5BwXfEV/O5TWqxblwcXJsT9e9lSupRwpSjVNNTPJ+/XkVZ/YNA1yBoG23TF1II8FLxdnStLW+fkA==", + "dgSpecHash": "pGFU0xfNi4nLi0e2b+i6DR2wgiyob2yQxLxlDzkcCpOCdw+C03VAunyli3b7rozwKJ3GhD7nJifxVqr+m+OBHw==", "success": true, "projectFilePath": "D:\\BMA-EHR-Recurit-Exam-Service\\BMA.EHR.Recurit.Exam.Service.csproj", "expectedPackageFiles": [ @@ -8,6 +8,7 @@ "C:\\Users\\M\\.nuget\\packages\\awssdk.s3\\3.7.103.39\\awssdk.s3.3.7.103.39.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\bma.ehr.core\\1.0.0\\bma.ehr.core.1.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\bma.ehr.extensions\\1.0.1\\bma.ehr.extensions.1.0.1.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\bouncycastle.netcore\\1.9.0\\bouncycastle.netcore.1.9.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\elasticsearch.net\\7.17.5\\elasticsearch.net.7.17.5.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\epplus\\6.1.3\\epplus.6.1.3.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\epplus.interfaces\\6.1.1\\epplus.interfaces.6.1.1.nupkg.sha512", @@ -75,7 +76,7 @@ "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.caching.memory\\7.0.0\\microsoft.extensions.caching.memory.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.configuration\\7.0.0\\microsoft.extensions.configuration.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\7.0.0\\microsoft.extensions.configuration.abstractions.7.0.0.nupkg.sha512", - "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.configuration.binder\\2.0.0\\microsoft.extensions.configuration.binder.2.0.0.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.configuration.binder\\6.0.0\\microsoft.extensions.configuration.binder.6.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\7.0.0\\microsoft.extensions.configuration.fileextensions.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.configuration.json\\7.0.0\\microsoft.extensions.configuration.json.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\7.0.0\\microsoft.extensions.dependencyinjection.7.0.0.nupkg.sha512", @@ -86,12 +87,15 @@ "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\7.0.0\\microsoft.extensions.fileproviders.physical.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\7.0.0\\microsoft.extensions.filesystemglobbing.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.hosting.abstractions\\3.1.8\\microsoft.extensions.hosting.abstractions.3.1.8.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.http\\6.0.0\\microsoft.extensions.http.6.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.localization\\2.2.0\\microsoft.extensions.localization.2.2.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.localization.abstractions\\2.2.0\\microsoft.extensions.localization.abstractions.2.2.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.logging\\7.0.0\\microsoft.extensions.logging.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\7.0.0\\microsoft.extensions.logging.abstractions.7.0.0.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.logging.configuration\\6.0.0\\microsoft.extensions.logging.configuration.6.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.objectpool\\2.2.0\\microsoft.extensions.objectpool.2.2.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.options\\7.0.0\\microsoft.extensions.options.7.0.0.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.options.configurationextensions\\6.0.0\\microsoft.extensions.options.configurationextensions.6.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.primitives\\7.0.0\\microsoft.extensions.primitives.7.0.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.extensions.webencoders\\2.2.0\\microsoft.extensions.webencoders.2.2.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\microsoft.identitymodel.jsonwebtokens\\6.15.1\\microsoft.identitymodel.jsonwebtokens.6.15.1.nupkg.sha512", @@ -112,6 +116,9 @@ "C:\\Users\\M\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\newtonsoft.json.bson\\1.0.2\\newtonsoft.json.bson.1.0.2.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\pomelo.entityframeworkcore.mysql\\7.0.0\\pomelo.entityframeworkcore.mysql.7.0.0.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\sentry\\3.30.0\\sentry.3.30.0.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\sentry.aspnetcore\\3.30.0\\sentry.aspnetcore.3.30.0.nupkg.sha512", + "C:\\Users\\M\\.nuget\\packages\\sentry.extensions.logging\\3.30.0\\sentry.extensions.logging.3.30.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\serilog\\2.12.0\\serilog.2.12.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\serilog.aspnetcore\\6.1.0\\serilog.aspnetcore.6.1.0.nupkg.sha512", "C:\\Users\\M\\.nuget\\packages\\serilog.enrichers.environment\\2.2.0\\serilog.enrichers.environment.2.2.0.nupkg.sha512",