diff --git a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveBeginingRepository.cs b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveBeginingRepository.cs index 35b18090..a62aa291 100644 --- a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveBeginingRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveBeginingRepository.cs @@ -149,7 +149,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var prevRemain = 0.0; if (prev != null) { - prevRemain = prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0); + prevRemain = prev.LeaveDays - prev.LeaveDaysUsed; } if (govAge >= 180) @@ -215,7 +215,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var prevRemain = 0.0; if (prev != null) { - prevRemain = prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0); + prevRemain = prev.LeaveDays - prev.LeaveDaysUsed; } if (govAge >= 180) @@ -288,7 +288,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var prevRemain = 0.0; if (prev != null) { - prevRemain = prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0); + prevRemain = prev.LeaveDays - prev.LeaveDaysUsed; } if (govAge >= 180) @@ -376,7 +376,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var prevRemain = 0.0; if (prev != null) { - prevRemain = prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0); + prevRemain = prev.LeaveDays - prev.LeaveDaysUsed; } if (govAge >= 180) diff --git a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs index 3070ee88..e58cb0f9 100644 --- a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs @@ -11,8 +11,6 @@ using Microsoft.Extensions.Configuration; using System.IO.Compression; using System.Net.Http.Headers; using System.Net.Http.Json; -using BMA.EHR.Application.Repositories.Leaves.TimeAttendants; -using BMA.EHR.Domain.Models.Leave.TimeAttendants; namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests { @@ -31,7 +29,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests private readonly MinIOLeaveService _minIOService; private readonly LeaveBeginningRepository _leaveBeginningRepository; - private readonly ProcessUserTimeStampRepository _processUserTimeStampRepository; private readonly string URL = string.Empty; @@ -47,8 +44,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests EmailSenderService emailSenderService, IApplicationDBContext appDbContext, MinIOLeaveService minIOService, - LeaveBeginningRepository leaveBeginningRepository, - ProcessUserTimeStampRepository processUserTimeStampRepository) : base(dbContext, httpContextAccessor) + LeaveBeginningRepository leaveBeginningRepository) : base(dbContext, httpContextAccessor) { _dbContext = dbContext; _httpContextAccessor = httpContextAccessor; @@ -62,7 +58,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests Console.WriteLine($"URL : {URL}"); _minIOService = minIOService; _leaveBeginningRepository = leaveBeginningRepository; - _processUserTimeStampRepository = processUserTimeStampRepository; } #endregion @@ -527,7 +522,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests //.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE") .ToListAsync(); - return data.Sum(x => x.LeaveTotal) + (beginningLeave == null ? 0 : (beginningLeave.LeaveDaysUsed ?? 0.0)); + return data.Sum(x => x.LeaveTotal) + (beginningLeave == null ? 0 : beginningLeave.LeaveDaysUsed); } //public async Task GetSumApproveLeaveByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId, int year) @@ -1330,68 +1325,9 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests } await _appDbContext.SaveChangesAsync(); - // ปรับสถานะการลงเวลา - if (rawData.LeaveStartDate.Date == rawData.LeaveEndDate.Date) - { - var processCheckIn = await _dbContext.Set() - .Where(x => x.KeycloakUserId == rawData.KeycloakUserId) - .Where(x => x.CheckIn.Date == rawData.LeaveStartDate.Date) - .FirstOrDefaultAsync(); - - - if (processCheckIn is not null) - { - switch (rawData.LeaveRange.Trim().ToUpper()) - { - case "MORNING": - processCheckIn.CheckInStatus = "NORMAL"; - break; - case "AFTERNOON": - processCheckIn.CheckOutStatus = "NORMAL"; - break; - case "ALL": - processCheckIn.CheckInStatus = "NORMAL"; - processCheckIn.CheckOutStatus = "NORMAL"; - break; - default: - break; - } - } - await _dbContext.SaveChangesAsync(); - } - else - { - var from = rawData.LeaveStartDate.Date; - var to = rawData.LeaveEndDate.Date; - for (var day = from.Date; day <= to.Date; day = day.AddDays(1)) - { - var processCheckIn = await _dbContext.Set() - .Where(x => x.KeycloakUserId == rawData.KeycloakUserId) - .Where(x => x.CheckIn.Date == day.Date) - .FirstOrDefaultAsync(); - - if (processCheckIn is not null) - { - switch (rawData.LeaveRange.Trim().ToUpper()) - { - case "MORNING": - processCheckIn.CheckInStatus = "NORMAL"; - break; - case "AFTERNOON": - processCheckIn.CheckOutStatus = "NORMAL"; - break; - case "ALL": - processCheckIn.CheckInStatus = "NORMAL"; - processCheckIn.CheckOutStatus = "NORMAL"; - break; - default: - break; - } - } - } - await _dbContext.SaveChangesAsync(); - } - + // insert to process timestamp + + // Send Noti var noti = new Notification { @@ -1550,7 +1486,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests KeycloakUserId = pf.Keycloak == null ? Guid.Empty : pf.Keycloak.Value, LeaveTypeId = b.LeaveTypeId, LeaveTypeCode = b.LeaveType!.Code, - SumLeaveDay = b.LeaveDaysUsed ?? 0.0 + SumLeaveDay = b.LeaveDaysUsed }); } } @@ -1941,7 +1877,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - .Where(x => ((x.DateSendLeave ?? x.CreatedAt) >= startDate && (x.DateSendLeave ??x.CreatedAt) <= endDate)) + .Where(x => ((x.DateSendLeave ?? x.CreatedAt).Date >= startDate && (x.DateSendLeave ??x.CreatedAt).Date < endDate)) //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") .ToListAsync(); @@ -1951,68 +1887,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests else return 0; } - - public async Task GetSumApproveLeaveTotalByTypeAndRangeForUserBefore(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => ((x.DateSendLeave ?? x.CreatedAt) >= startDate && (x.DateSendLeave ?? x.CreatedAt) < endDate)) - //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - - public async Task GetSumApproveLeaveTotalByTypeAndRangeForUserByProfile(Guid profileId, Guid leaveTypeId, DateTime startDate, DateTime endDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.ProfileId == profileId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => ((x.DateSendLeave ?? x.CreatedAt) >= startDate && (x.DateSendLeave ??x.CreatedAt) <= endDate)) - //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - - public async Task GetSumApproveLeaveCountByTypeAndRangeForUserByProfile(Guid profileId, Guid leaveTypeId, DateTime startDate, DateTime endDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.ProfileId == profileId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => ((x.DateSendLeave ?? x.CreatedAt) >= startDate && (x.DateSendLeave ??x.CreatedAt) <= endDate)) - //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - return data.Count; - } - - public async Task GetSumApproveLeaveCountByTypeAndRangeForUser2(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => ((x.DateSendLeave ?? x.CreatedAt) >= startDate && (x.DateSendLeave ??x.CreatedAt) <= endDate)) - //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - return data.Count; - } /// /// วันลาที่สร้างแบบร่างยังไม่ได้ยื่น @@ -2054,9 +1928,9 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - .Where(x => ((x.DateSendLeave ?? x.CreatedAt) >= startDate && (x.DateSendLeave ??x.CreatedAt) < endDate)) + .Where(x => ((x.DateSendLeave ?? x.CreatedAt).Date >= startDate && (x.DateSendLeave ??x.CreatedAt).Date < endDate)) //.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => (x.LeaveStatus == "NEW" || x.LeaveStatus == "PENDING")) + .Where(x => x.LeaveStatus == "NEW") .ToListAsync(); if (data.Count > 0) diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs index d4bc0ea8..0544e261 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs @@ -213,79 +213,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants } } - public async Task> GetAdditionalCheckRequestsByAdminRole2(DateTime startDate, DateTime endDate, string role, string nodeId, int? node, string? keyword, string? status) - { - try - { - var data = await _dbContext.Set().AsQueryable() - .Where(x => (x.CheckDate.Date >= startDate.Date && x.CheckDate.Date <= endDate.Date)) - .OrderByDescending(x => x.CreatedAt.Date) - .ToListAsync(); - - if(!string.IsNullOrEmpty(status)) - data = data.Where(x => x.Status == status).ToList(); - - - if (!string.IsNullOrEmpty(keyword)) - { - data = data.Where(x => - ( - (x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) - || x.Description.Contains(keyword) - - ).ToList(); - } - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data = data - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))) - .ToList(); - } - else if (role == "BROTHER") - { - data = data - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))) - .ToList(); - } - else if (role == "ROOT") - { - data = data - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList(); - } - // else if (role == "PARENT") - // { - // data = data - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null && x.Child1DnaId != Guid.Empty).ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && - (x.Child1DnaId == Guid.Empty || x.Child1DnaId == null) : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && - (x.Child2DnaId == Guid.Empty || x.Child2DnaId == null) : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && - (x.Child3DnaId == Guid.Empty || x.Child3DnaId == null) : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && - (x.Child4DnaId == Guid.Empty || x.Child4DnaId == null) : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - return data; - } - catch - { - throw; - } - } - - #endregion } } diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs index e0967a5c..302bdd12 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs @@ -114,62 +114,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return job!; } - /// - /// ดึงข้อมูลงานที่ค้างอยู่ในสถานะ PENDING หรือ PROCESSING เกินเวลาที่กำหนด (นาที) - /// - public async Task> GetStalePendingOrProcessingJobsAsync(int timeoutMinutes = 30) - { - //var cutoffDate = DateTime.Now.AddMinutes(-timeoutMinutes); - var cutoffDate = DateTime.Now.AddMinutes(-timeoutMinutes); - var staleJobs = await _dbContext.Set() - .Where(x => (x.Status == "PENDING" || x.Status == "PROCESSING") - && x.CreatedDate <= cutoffDate) - .OrderBy(x => x.CreatedDate) - .ToListAsync(); - - return staleJobs; - } - - /// - /// ดึงข้อมูลงานที่ค้างอยู่ในสถานะ PENDING หรือ PROCESSING เกินเวลาที่กำหนด (นาที) ของ user คนใดคนหนึ่ง - /// - public async Task> GetStalePendingOrProcessingJobsByUserAsync(Guid userId, int timeoutMinutes = 30) - { - var cutoffDate = DateTime.Now.AddMinutes(-timeoutMinutes); - //var cutoffDate = new DateTime(2026, 5, 28, 23, 59, 59); - var staleJobs = await _dbContext.Set() - .Where(x => x.KeycloakUserId == userId - && (x.Status == "PENDING" || x.Status == "PROCESSING") - && x.CreatedDate < cutoffDate) - .OrderBy(x => x.CreatedDate) - .ToListAsync(); - - return staleJobs; - } - - /// - /// Mark งานที่ค้างเกินเวลาที่กำหนดเป็น FAILED - /// - public async Task MarkStaleJobsAsFailedAsync(int timeoutMinutes = 30) - { - var staleJobs = await GetStalePendingOrProcessingJobsAsync(timeoutMinutes); - - foreach (var job in staleJobs) - { - job.Status = "FAILED"; - job.CompletedDate = DateTime.Now; - job.ErrorMessage = $"งานค้างในสถานะ {job.Status} เกิน {timeoutMinutes} นาที ระบบทำเครื่องหมายเป็น FAILED อัตโนมัติ"; - } - - if (staleJobs.Any()) - { - _dbContext.Set().UpdateRange(staleJobs); - await _dbContext.SaveChangesAsync(); - } - - return staleJobs.Count; - } - /// /// ล้างข้อมูล Job Status ที่เก่าเกิน X วัน /// diff --git a/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs b/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs index 1c8ae006..c5c09a44 100644 --- a/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs +++ b/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs @@ -49,16 +49,12 @@ namespace BMA.EHR.Application.Repositories.MetaData public async Task GetHolidayCountAsync(DateTime startDate, DateTime endDate, string category = "NORMAL") { - var query = _dbContext.Set().AsQueryable() + var data = await _dbContext.Set().AsQueryable() .Where(x => x.Category == category) - .Where(x => x.HolidayDate.Date >= startDate && x.HolidayDate.Date <= endDate); + .Where(x => x.HolidayDate.Date >= startDate && x.HolidayDate.Date <= endDate) + .CountAsync(); - if (category == "NORMAL") - query = query.Where(x => x.HolidayDate.DayOfWeek != DayOfWeek.Saturday && x.HolidayDate.DayOfWeek != DayOfWeek.Sunday); - else - query = query.Where(x => x.HolidayDate.DayOfWeek != DayOfWeek.Sunday); - - return await query.CountAsync(); + return data; } public List GetWeekEnd(DateTime startDate, DateTime endDate, string category = "NORMAL") diff --git a/BMA.EHR.Application/Repositories/PlacementRepository.cs b/BMA.EHR.Application/Repositories/PlacementRepository.cs index eb7c3617..49f1175c 100644 --- a/BMA.EHR.Application/Repositories/PlacementRepository.cs +++ b/BMA.EHR.Application/Repositories/PlacementRepository.cs @@ -2,40 +2,24 @@ using BMA.EHR.Domain.Models.Placement; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using System.Net.Http.Headers; -using Newtonsoft.Json; namespace BMA.EHR.Application.Repositories { - /// - /// Response model จาก Org API (check-isLeave) - /// - public class OrgProfileResult - { - public string citizenId { get; set; } = ""; - public string? profileId { get; set; } - public bool isLeave { get; set; } - public bool isActive { get; set; } - } - public class PlacementRepository : GenericRepository { #region " Fields " private readonly IApplicationDBContext _dbContext; private readonly IHttpContextAccessor _httpContextAccessor; - private readonly IConfiguration _configuration; #endregion #region " Constructor and Destructor " - public PlacementRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor, IConfiguration configuration) : base(dbContext, httpContextAccessor) + public PlacementRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor) { _dbContext = dbContext; _httpContextAccessor = httpContextAccessor; - _configuration = configuration; } #endregion @@ -92,148 +76,6 @@ namespace BMA.EHR.Application.Repositories return data; } - /// - /// Job อัพเดทสถานะผู้สอบผ่านที่ลาออกไปแล้วแต่ยังไม่ส่งไปออกคำสั่ง - /// และอัพเดทบุคคลภายนอกที่เข้ามาอยู่ในระบบแล้ว - /// ทำงานทุกวันเวลา 05:00 น. - /// - public async Task UpdateStatusPlacementProfiles() - { - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] === STARTED ==="); - - // 1. Query ทั้ง 2 กรณี: ทุกคนที่ยังไม่ DONE - var allCitizenIds = await _dbContext.Set() - .Where(p => !string.IsNullOrEmpty(p.CitizenId) - && p.PlacementStatus != "DONE" - // && p.CitizenId == "2536721883131" - ) - .Select(p => new { p.CitizenId, p.IsOfficer }) - .ToListAsync(); - - if (!allCitizenIds.Any()) - { - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] No profiles to process"); - return; - } - - var officerCount = allCitizenIds.Count(x => x.IsOfficer == true); - var notOfficerCount = allCitizenIds.Count(x => x.IsOfficer == false); - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] พบข้าราชการ {officerCount} คน, บุคคลภายนอก {notOfficerCount} คน"); - - // 2. ส่ง citizenIds ทั้งหมดไป Org API ครั้งเดียว - var citizenIds = allCitizenIds.Select(x => x.CitizenId).Distinct().ToList(); - var apiUrl = $"{_configuration["API"]}/org/dotnet/check-isLeave"; - - List orgResults = new(); - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - - var payload = new { citizenIds }; - var jsonPayload = JsonConvert.SerializeObject(payload); - var content = new StringContent(jsonPayload, System.Text.Encoding.UTF8, "application/json"); - - try - { - var response = await client.PostAsync(apiUrl, content); - var result = await response.Content.ReadAsStringAsync(); - - var responseObj = JsonConvert.DeserializeAnonymousType(result, new - { - status = 0, - message = "", - result = new List() - }); - - orgResults = responseObj?.result ?? new(); - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] Org API ตอบกลับ {orgResults.Count} รายการ"); - } - catch (Exception ex) - { - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] Call API failed: {ex.Message}"); - return; - } - } - - if (!orgResults.Any()) - { - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] ไม่มีรายการต้องอัปเดต"); - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] === COMPLETED ==="); - return; - } - - // 3. แยกข้อมูลตามเงื่อนไข - var leaveCitizenIds = orgResults.Where(x => x.isLeave).Select(x => x.citizenId).ToList(); - var inSystemProfiles = orgResults.Where(x => x.isActive && !x.isLeave && !string.IsNullOrEmpty(x.profileId)).ToList(); - - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] ลาออก {leaveCitizenIds.Count} รายการ, อยู่ที่ทะเบียนประวัติ {inSystemProfiles.Count} รายการ"); - - // 4. Split Batch Update (500 รายการ/batch) - var batchSize = 500; - var totalUpdated = 0; - - // 4.1 Update คนลาออก → IsOfficer = false - if (leaveCitizenIds.Any()) - { - var totalBatches = (int)Math.Ceiling((double)leaveCitizenIds.Count / batchSize); - for (int i = 0; i < totalBatches; i++) - { - var batch = leaveCitizenIds.Skip(i * batchSize).Take(batchSize).ToList(); - - var profilesToUpdate = await _dbContext.Set() - .Where(p => !string.IsNullOrEmpty(p.CitizenId) - && batch.Contains(p.CitizenId) - && p.IsOfficer == true) - .ToListAsync(); - - foreach (var profile in profilesToUpdate) - { - profile.profileId = null; - profile.IsOfficer = false; - } - - await _dbContext.SaveChangesAsync(); - totalUpdated += profilesToUpdate.Count; - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] [ลาออก] Batch {i + 1}/{totalBatches} → อัปเดต {profilesToUpdate.Count} รายการ"); - } - } - - // 4.2 Update คนที่อยู่ในทะเบียนประวัติ → profileId + IsOfficer = true - if (inSystemProfiles.Any()) - { - var totalBatches = (int)Math.Ceiling((double)inSystemProfiles.Count / batchSize); - for (int i = 0; i < totalBatches; i++) - { - var batch = inSystemProfiles.Skip(i * batchSize).Take(batchSize).ToList(); - var batchCitizenIds = batch.Select(x => x.citizenId).ToList(); - - var profilesToUpdate = await _dbContext.Set() - .Where(p => !string.IsNullOrEmpty(p.CitizenId) - && batchCitizenIds.Contains(p.CitizenId) - && p.IsOfficer == false) - .ToListAsync(); - - foreach (var profile in profilesToUpdate) - { - var orgProfile = batch.FirstOrDefault(x => x.citizenId == profile.CitizenId); - if (orgProfile != null) - { - profile.profileId = orgProfile.profileId; - profile.IsOfficer = true; - } - } - - await _dbContext.SaveChangesAsync(); - totalUpdated += profilesToUpdate.Count; - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] [เข้าระบบ] Batch {i + 1}/{totalBatches} → อัปเดต {profilesToUpdate.Count} รายการ"); - } - } - - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] อัปเดตรวมทั้งหมด {totalUpdated} รายการ"); - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] === COMPLETED ==="); - } - #endregion } } diff --git a/BMA.EHR.Application/Repositories/UserProfileRepository.cs b/BMA.EHR.Application/Repositories/UserProfileRepository.cs index aa89d9b9..4f081f77 100644 --- a/BMA.EHR.Application/Repositories/UserProfileRepository.cs +++ b/BMA.EHR.Application/Repositories/UserProfileRepository.cs @@ -233,29 +233,6 @@ namespace BMA.EHR.Application.Repositories throw; } } - - public async Task GetProfileByCheckInAsync(Guid keycloakId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/check-keycloak/{keycloakId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } public async Task GetProfileLeaveByKeycloakIdAsync(Guid keycloakId, string? accessToken) @@ -1062,42 +1039,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task> GetEmployeeByAdminRolev2(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/employee-by-admin-rolev2"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - role = role, - // isRetirement - reqNode = reqNode, - reqNodeId = reqNodeId, - date = endDate - }; - Console.WriteLine(body); - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return new List(); - } - catch - { - throw; - } - } - public async Task SearchProfile(string? citizenId, string? firstName, string? lastName, string accessToken, int page, int pageSize, string? role, string? nodeId, int? node,string? selectedNodeId,int? selectedNode ) { try diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index 35a9dfa2..85388209 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -968,20 +968,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command19/report")] - public async Task> PostReportCommand19([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand19([FromBody] ReportPersonRequest req) { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1001,13 +993,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1027,11 +1013,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1080,8 +1061,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var _result = await _res.Content.ReadAsStringAsync(); if (_res.IsSuccessStatusCode) { - //// คำสั่งไล่ออก หรือ ปลดออก Status หลังออกคำสั่งใช้ "REPORTED" เพื่อไม่ให้ส่งรายชื่อไปออกคำสั่งซ้ำได้ - // data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); + // คำสั่งไล่ออก หรือ ปลดออก Status หลังออกคำสั่งใช้ "REPORTED" เพื่อไม่ให้ส่งรายชื่อไปออกคำสั่งซ้ำได้ + data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); var _profile = new List(); DateTime _date = DateTime.Now; foreach (var item in data) @@ -1124,20 +1105,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command20/report")] - public async Task> PostReportcommand20([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportcommand20([FromBody] ReportPersonRequest req) { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1157,13 +1130,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1183,11 +1150,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1236,8 +1198,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var _result = await _res.Content.ReadAsStringAsync(); if (_res.IsSuccessStatusCode) { - //// คำสั่งไล่ออก หรือ ปลดออก Status หลังออกคำสั่งใช้ "REPORTED" เพื่อไม่ให้ส่งรายชื่อไปออกคำสั่งซ้ำได้ - // data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); + // คำสั่งไล่ออก หรือ ปลดออก Status หลังออกคำสั่งใช้ "REPORTED" เพื่อไม่ให้ส่งรายชื่อไปออกคำสั่งซ้ำได้ + data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); var _profile = new List(); DateTime _date = DateTime.Now; foreach (var item in data) @@ -1417,11 +1379,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers // .Where(x => x.Status == "REPORT") .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1467,12 +1424,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => profile.Status = "DONE"); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -1561,11 +1518,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers // .Where(x => x.Status == "REPORT") .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1611,12 +1563,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => profile.Status = "DONE"); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -1630,22 +1582,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command27/report")] - public async Task> PostReportCommand27([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand27([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1672,13 +1616,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1703,11 +1641,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -1753,12 +1686,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -1772,22 +1705,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command28/report")] - public async Task> PostReportCommand28([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand28([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1814,13 +1739,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1845,11 +1764,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -1895,12 +1809,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -1914,22 +1828,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command29/report")] - public async Task> PostReportCommand29([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand29([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1956,13 +1862,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1987,11 +1887,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2037,12 +1932,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -2056,22 +1951,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command30/report")] - public async Task> PostReportCommand30([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand30([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -2098,13 +1985,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -2129,11 +2010,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2179,12 +2055,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -2198,22 +2074,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command31/report")] - public async Task> PostReportCommand31([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand31([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -2240,13 +2108,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -2271,11 +2133,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2321,12 +2178,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -2340,7 +2197,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command32/report")] - public async Task> PostReportCommand32([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand32([FromBody] ReportPersonRequest req) { try { @@ -2353,15 +2210,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data2.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper()); - data2.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data2.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); @@ -2396,13 +2245,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers // .Where(x => x.IsReport == "REPORT") .ToListAsync(); - // data2.ForEach(profile => profile.IsReport = "NEW"); - data2.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data2.ForEach(profile => profile.IsReport = "NEW"); await _context.SaveChangesAsync(); return Success(); @@ -2429,11 +2272,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers // .Where(x => x.IsReport == "REPORT") .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.IsReport = "DONE"); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2479,12 +2317,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => profile.IsReport = "DONE"); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.IsReport = "DONE"); + await _context.SaveChangesAsync(); + } } var data1 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates diff --git a/BMA.EHR.Domain/Common/BaseController.cs b/BMA.EHR.Domain/Common/BaseController.cs index 0b382d95..26f71bf5 100644 --- a/BMA.EHR.Domain/Common/BaseController.cs +++ b/BMA.EHR.Domain/Common/BaseController.cs @@ -95,9 +95,6 @@ namespace BMA.EHR.Domain.Common protected Guid? ProfileId => User.GetProfileId(); protected string? Prefix => User.GetPrefix(); protected string? FullNameFromClaim => User.GetName(); - - protected string? FirstName => User.GetFirstName(); - protected string? LastName => User.GetLastName(); #endregion diff --git a/BMA.EHR.Domain/Extensions/ClaimsPrincipalExtensions.cs b/BMA.EHR.Domain/Extensions/ClaimsPrincipalExtensions.cs index cc44f8a1..26a7c189 100644 --- a/BMA.EHR.Domain/Extensions/ClaimsPrincipalExtensions.cs +++ b/BMA.EHR.Domain/Extensions/ClaimsPrincipalExtensions.cs @@ -26,7 +26,5 @@ namespace BMA.EHR.Domain.Extensions public static Guid? GetProfileId(this ClaimsPrincipal user) => user.GetGuidClaim(BmaClaimTypes.ProfileId); public static string? GetPrefix(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.Prefix); public static string? GetName(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.Name); - public static string? GetFirstName(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.GivenName); - public static string? GetLastName(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.FamilyName); } } diff --git a/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs b/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs index 0bb9a1c1..153b7d22 100644 --- a/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs +++ b/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs @@ -27,11 +27,11 @@ namespace BMA.EHR.Domain.Models.Leave.Requests [Required, Comment("จำนวนวันลาทั้งหมด")] public double LeaveDays { get; set; } = 0.0; - [Comment("จำนวนวันลาที่ใช้ไป")] - public double? LeaveDaysUsed { get; set; } = 0.0; + [Required, Comment("จำนวนวันลาที่ใช้ไป")] + public double LeaveDaysUsed { get; set; } = 0.0; [Comment("จำนวนครั้งที่ลาสะสม")] - public int? LeaveCount { get; set; } = 0; + public int LeaveCount { get; set; } = 0; public Guid? RootDnaId { get; set; } diff --git a/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequestApprover.cs b/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequestApprover.cs index 0a46c199..f974d004 100644 --- a/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequestApprover.cs +++ b/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequestApprover.cs @@ -38,10 +38,5 @@ namespace BMA.EHR.Domain.Models.Leave.Requests public string Comment { get; set; } = string.Empty; public string? ApproveType { get; set; } = string.Empty; // ผู้บังคับบัญชา = commander, ผู้มีอำนาจอนุมัติ = Approver - - - public bool IsAct { get; set; } = false; - - public string KeyId { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs index 474dcb69..870a7817 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs @@ -119,10 +119,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? position { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] diff --git a/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs b/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs index c660c8ca..5a94e63b 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs @@ -321,10 +321,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? positionName { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("สายงาน")] public string? positionField { get; set; } [Comment("id ประเภทตำแหน่ง")] diff --git a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs index 3b1b625c..9d366d19 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs @@ -64,10 +64,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? profileId { get; set; } [Comment("คำนำหน้า")] public string? prefix { get; set; } - - [Comment("ยศ")] - public string? rank { get; set; } - [Comment("ชื่อ")] public string? firstName { get; set; } [Comment("นามสกุล")] @@ -132,10 +128,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? position { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs index c1f69ece..b37e47aa 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs @@ -173,10 +173,6 @@ namespace BMA.EHR.Domain.Models.Retirement public string? position { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] diff --git a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.Designer.cs deleted file mode 100644 index b65f0774..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.Designer.cs +++ /dev/null @@ -1,21250 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20260512073417_update_PlacementReceives_add_rank")] - partial class update_PlacementReceives_add_rank - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .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("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .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("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .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("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .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("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .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("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .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("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - 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.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.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.Domain.Models.HR.LimitLeave", 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("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("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("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .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("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .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("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") - .HasColumnType("datetime(6)") - .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") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") - .HasColumnType("datetime(6)") - .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") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("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("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .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("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .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("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .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("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - 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("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .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("Date") - .HasColumnType("datetime(6)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .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("Date") - .HasColumnType("datetime(6)") - .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("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("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("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("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("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .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("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .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("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .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("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .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("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") - .HasColumnType("tinyint(1)"); - - 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("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .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("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .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("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .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") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - 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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - 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("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .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") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .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") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", 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("InsigniaPeriodId") - .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("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") - .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("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") - .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("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - 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("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .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("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("InsigniaNoteId") - .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("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .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("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - 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") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", 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("InsigniaNoteProfileId") - .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("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - 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("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .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(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(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("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .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(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .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("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .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("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - 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("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .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("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .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("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - 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("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - 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("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - 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("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .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("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .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("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - 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("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") - .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("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - 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("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - 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("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - 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("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - 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("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") - .HasColumnType("longtext"); - - 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.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .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("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") - .HasColumnType("datetime(6)") - .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() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .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("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", 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("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .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("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("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() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("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("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .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("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .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("Lastname") - .HasColumnType("longtext") - .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("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("double") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("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("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - 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("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rank") - .HasColumnType("longtext") - .HasComment("ยศ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .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("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .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("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("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() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .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("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .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("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .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("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .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("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .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("EducationOld") - .HasColumnType("longtext") - .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("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - 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("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - 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("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .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("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .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("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", 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("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", 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("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", 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("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", 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("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.cs b/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.cs deleted file mode 100644 index 1a258f42..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_PlacementReceives_add_rank : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "rank", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "ยศ") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "rank", - table: "PlacementReceives"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.Designer.cs deleted file mode 100644 index 894b1262..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.Designer.cs +++ /dev/null @@ -1,21266 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20260521081933_update_Tables_add_posExecutiveId")] - partial class update_Tables_add_posExecutiveId - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .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("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .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("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .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("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .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("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .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("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", 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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .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("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", 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("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - 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.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.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.Domain.Models.HR.LimitLeave", 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("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", 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("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("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("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .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("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .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("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", 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("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", 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("Date") - .HasColumnType("datetime(6)") - .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") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", 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("Date") - .HasColumnType("datetime(6)") - .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") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", 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("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", 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("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("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("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .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("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .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("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", 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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .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("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - 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("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .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("Date") - .HasColumnType("datetime(6)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .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("Date") - .HasColumnType("datetime(6)") - .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("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("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("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("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("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", 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("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", 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("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", 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("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", 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("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .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("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", 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("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .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("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", 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("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .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("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", 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("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .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("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", 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("IsActive") - .HasColumnType("tinyint(1)"); - - 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("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .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("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", 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("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .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("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .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") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - 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("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .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("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - 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("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", 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("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .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") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", 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("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .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") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", 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("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", 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("InsigniaPeriodId") - .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("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", 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("InsigniaId") - .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("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", 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("InsigniaManageId") - .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("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - 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("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .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("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", 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("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", 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("InsigniaNoteId") - .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("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .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("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - 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") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", 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("InsigniaNoteProfileId") - .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("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", 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("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - 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("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .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(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", 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("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(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("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", 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("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .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(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .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("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", 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("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", 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("IsActive") - .HasColumnType("tinyint(1)") - .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("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", 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("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .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(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .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("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - 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("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", 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("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .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("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .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("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - 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("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - 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("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - 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("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", 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("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", 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("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", 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("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", 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("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .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("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .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("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", 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("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - 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("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", 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("Detail") - .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("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", 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("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - 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("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", 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("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - 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("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", 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("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", 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("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - 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("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", 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("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - 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("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", 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("Detail") - .HasColumnType("longtext"); - - 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.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", 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("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .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("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", 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("EndDate") - .HasColumnType("datetime(6)") - .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() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .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("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", 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("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", 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("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .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("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .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("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", 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("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() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("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("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .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("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .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("Lastname") - .HasColumnType("longtext") - .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("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .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("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("double") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", 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("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("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("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - 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("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rank") - .HasColumnType("longtext") - .HasComment("ยศ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", 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("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .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("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .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("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", 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("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", 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("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", 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("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() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .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("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .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("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", 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("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .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("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .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("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .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("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .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("EducationOld") - .HasColumnType("longtext") - .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("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", 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("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .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("Date") - .HasColumnType("datetime(6)") - .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("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", 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("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - 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("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", 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("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - 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("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", 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("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .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("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .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("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", 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("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", 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("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", 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("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", 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("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .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("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .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("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", 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("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", 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("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.cs b/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.cs deleted file mode 100644 index aea9ff02..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_Tables_add_posExecutiveId : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "RetirementOthers", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "PlacementProfiles", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "PlacementAppointments", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "RetirementOthers"); - - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "PlacementReceives"); - - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "PlacementProfiles"); - - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "PlacementAppointments"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs b/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs index 273e0978..56218ff2 100644 --- a/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs +++ b/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs @@ -11721,10 +11721,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id revision"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); @@ -13112,10 +13108,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); @@ -13621,10 +13613,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id revision"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); @@ -13705,10 +13693,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("profile Id"); - b.Property("rank") - .HasColumnType("longtext") - .HasComment("ยศ"); - b.Property("root") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน root"); @@ -15815,10 +15799,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id revision"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.Designer.cs deleted file mode 100644 index f95eab33..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.Designer.cs +++ /dev/null @@ -1,1805 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260505035145_Change Field")] - partial class ChangeField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.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("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .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("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .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("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", 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("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - 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("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateSendLeave") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - 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("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .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("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .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("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - 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("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", 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") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - 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("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.LeaveProcessJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .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("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุด"); - - b.Property("ErrorMessage") - .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("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("รหัส Root DNA Id"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้น"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.HasKey("Id"); - - b.ToTable("LeaveProcessJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 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("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("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .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("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .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("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.cs deleted file mode 100644 index a6ffb9e4..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class ChangeField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "LeaveDaysUsed", - table: "LeaveBeginnings", - type: "double", - nullable: true, - comment: "จำนวนวันลาที่ใช้ไป", - oldClrType: typeof(double), - oldType: "double", - oldComment: "จำนวนวันลาที่ใช้ไป"); - - migrationBuilder.AlterColumn( - name: "LeaveCount", - table: "LeaveBeginnings", - type: "int", - nullable: true, - comment: "จำนวนครั้งที่ลาสะสม", - oldClrType: typeof(int), - oldType: "int", - oldComment: "จำนวนครั้งที่ลาสะสม"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "LeaveDaysUsed", - table: "LeaveBeginnings", - type: "double", - nullable: false, - defaultValue: 0.0, - comment: "จำนวนวันลาที่ใช้ไป", - oldClrType: typeof(double), - oldType: "double", - oldNullable: true, - oldComment: "จำนวนวันลาที่ใช้ไป"); - - migrationBuilder.AlterColumn( - name: "LeaveCount", - table: "LeaveBeginnings", - type: "int", - nullable: false, - defaultValue: 0, - comment: "จำนวนครั้งที่ลาสะสม", - oldClrType: typeof(int), - oldType: "int", - oldNullable: true, - oldComment: "จำนวนครั้งที่ลาสะสม"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs deleted file mode 100644 index 165b8195..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs +++ /dev/null @@ -1,1812 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260511075931_Add Approver Field")] - partial class AddApproverField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.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("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .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("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .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("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", 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("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - 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("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateSendLeave") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - 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("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsAct") - .HasColumnType("tinyint(1)"); - - b.Property("KeyId") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - 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("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .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("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .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("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - 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("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", 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") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - 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("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.LeaveProcessJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .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("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุด"); - - b.Property("ErrorMessage") - .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("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("รหัส Root DNA Id"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้น"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.HasKey("Id"); - - b.ToTable("LeaveProcessJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 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("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("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .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("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .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("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - 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("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - 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("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.cs deleted file mode 100644 index 83d313b0..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddApproverField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsAct", - table: "LeaveRequestApprovers", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "KeyId", - table: "LeaveRequestApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsAct", - table: "LeaveRequestApprovers"); - - migrationBuilder.DropColumn( - name: "KeyId", - table: "LeaveRequestApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs index 99694a78..887d4f97 100644 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs +++ b/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs @@ -192,7 +192,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnOrder(102) .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - b.Property("LeaveCount") + b.Property("LeaveCount") .HasColumnType("int") .HasComment("จำนวนครั้งที่ลาสะสม"); @@ -200,7 +200,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnType("double") .HasComment("จำนวนวันลาทั้งหมด"); - b.Property("LeaveDaysUsed") + b.Property("LeaveDaysUsed") .HasColumnType("double") .HasComment("จำนวนวันลาที่ใช้ไป"); @@ -713,13 +713,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .IsRequired() .HasColumnType("longtext"); - b.Property("IsAct") - .HasColumnType("tinyint(1)"); - - b.Property("KeyId") - .IsRequired() - .HasColumnType("longtext"); - b.Property("KeycloakId") .HasColumnType("char(36)"); diff --git a/BMA.EHR.Leave/BMA.EHR.Leave.csproj b/BMA.EHR.Leave/BMA.EHR.Leave.csproj index e7c58efa..28f42590 100644 --- a/BMA.EHR.Leave/BMA.EHR.Leave.csproj +++ b/BMA.EHR.Leave/BMA.EHR.Leave.csproj @@ -74,9 +74,6 @@ PreserveNewest - - PreserveNewest - diff --git a/BMA.EHR.Leave/Controllers/LeaveBeginningController.cs b/BMA.EHR.Leave/Controllers/LeaveBeginningController.cs index 2aa4988f..e580b00a 100644 --- a/BMA.EHR.Leave/Controllers/LeaveBeginningController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveBeginningController.cs @@ -33,7 +33,6 @@ namespace BMA.EHR.Leave.Service.Controllers private readonly IConfiguration _configuration; private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; - private readonly LeaveRequestRepository _leaveRequestRepository; #endregion @@ -45,8 +44,7 @@ namespace BMA.EHR.Leave.Service.Controllers IWebHostEnvironment hostingEnvironment, IConfiguration configuration, UserProfileRepository userProfileRepository, - PermissionRepository permission, - LeaveRequestRepository leaveRequestRepository) + PermissionRepository permission) { _leaveBeginningRepository = leaveBeginningRepository; _context = context; @@ -55,7 +53,6 @@ namespace BMA.EHR.Leave.Service.Controllers _configuration = configuration; _userProfileRepository = userProfileRepository; _permission = permission; - _leaveRequestRepository = leaveRequestRepository; } #endregion @@ -378,15 +375,6 @@ namespace BMA.EHR.Leave.Service.Controllers try { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - // var profileId = ProfileId ?? Guid.Empty; - // var prefix = Prefix ?? ""; - // var firstName = FirstName ?? ""; - // var lastName = LastName ?? ""; - // var rootDnaId = OrgRootDnaId ?? Guid.Empty; - // var child1DnaId = OrgChild1DnaId ?? Guid.Empty; - // var child2DnaId = OrgChild2DnaId ?? Guid.Empty; - // var child3DnaId = OrgChild3DnaId ?? Guid.Empty; - // var child4DnaId = OrgChild4DnaId ?? Guid.Empty; var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_HISTORY"); var jsonData = JsonConvert.DeserializeObject(getPermission); @@ -398,41 +386,20 @@ namespace BMA.EHR.Leave.Service.Controllers if (leaveBeginning == null) return Error("ไม่พบข้อมูลที่ต้องการแก้ไข", StatusCodes.Status404NotFound); + var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken); if (profile == null) { return Error("ไม่พบข้อมูลข้าราชการหรือลูกจ้าง", StatusCodes.Status404NotFound); } - - var startFiscalDate = new DateTime(DateTime.Now.Year - 1, 10, 1); - var endFiscalDate = new DateTime(DateTime.Now.Year, 9, 30); - - - if (req.LeaveDaysUsed is null || req.LeaveCount is null) - { - var systemLeaveDays = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUserByProfile(req.ProfileId, req.LeaveTypeId, startFiscalDate, endFiscalDate); - var systemLeaveCount = await _leaveRequestRepository.GetSumApproveLeaveCountByTypeAndRangeForUserByProfile(req.ProfileId, req.LeaveTypeId, startFiscalDate, endFiscalDate); - - leaveBeginning.LeaveDaysUsed = req.BeginningLeaveDays + systemLeaveDays; - leaveBeginning.LeaveCount = req.BeginningLeaveCount + systemLeaveCount; - - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - } - else - { - leaveBeginning.LeaveDaysUsed = req.LeaveDaysUsed; - leaveBeginning.LeaveCount = req.LeaveCount; - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - //var systemLeaveDays = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser2(profile.Keycloak ?? Guid.Empty, req.LeaveTypeId, startFiscalDate, endFiscalDate); - //var systemLeaveCount = await _leaveRequestRepository.GetSumApproveLeaveCountByTypeAndRangeForUser2(profile.Keycloak ?? Guid.Empty, req.LeaveTypeId, startFiscalDate, endFiscalDate); - } leaveBeginning.LeaveTypeId = req.LeaveTypeId; leaveBeginning.LeaveYear = req.LeaveYear; leaveBeginning.LeaveDays = req.LeaveDays; - + leaveBeginning.LeaveDaysUsed = req.LeaveDaysUsed; + leaveBeginning.LeaveCount = req.LeaveCount; + leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; + leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; leaveBeginning.ProfileId = req.ProfileId; leaveBeginning.Prefix = profile.Prefix; @@ -473,17 +440,6 @@ namespace BMA.EHR.Leave.Service.Controllers try { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - // var profileId = ProfileId ?? Guid.Empty; - // var prefix = Prefix ?? ""; - // var firstName = FirstName ?? ""; - // var lastName = LastName ?? ""; - // var rootDnaId = OrgRootDnaId ?? Guid.Empty; - // var child1DnaId = OrgChild1DnaId ?? Guid.Empty; - // var child2DnaId = OrgChild2DnaId ?? Guid.Empty; - // var child3DnaId = OrgChild3DnaId ?? Guid.Empty; - // var child4DnaId = OrgChild4DnaId ?? Guid.Empty; - var getPermission = await _permission.GetPermissionAPIAsync("CREATE", "SYS_LEAVE_HISTORY"); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") @@ -508,26 +464,13 @@ namespace BMA.EHR.Leave.Service.Controllers } var leaveBeginning = new LeaveBeginning(); - - if (req.LeaveDaysUsed is null || req.LeaveCount is null) - { - leaveBeginning.LeaveDaysUsed = req.BeginningLeaveDays; - leaveBeginning.LeaveCount = req.BeginningLeaveCount; - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - } - else - { - leaveBeginning.LeaveDaysUsed = req.LeaveDaysUsed; - leaveBeginning.LeaveCount = req.LeaveCount; - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - } - leaveBeginning.LeaveTypeId = req.LeaveTypeId; leaveBeginning.LeaveYear = req.LeaveYear; leaveBeginning.LeaveDays = req.LeaveDays; - + leaveBeginning.LeaveDaysUsed = req.LeaveDaysUsed; + leaveBeginning.LeaveCount = req.LeaveCount; + leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; + leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; leaveBeginning.ProfileId = req.ProfileId; leaveBeginning.Prefix = profile.Prefix; diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index f04c00ce..1dca793e 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -33,7 +33,6 @@ using System.Diagnostics; using System.Security.Claims; using System.Text; using System.Threading.Tasks; -using BMA.EHR.Leave.Services; using SearchProfileResultDto = BMA.EHR.Leave.Service.DTOs.ChangeRound.SearchProfileResultDto; namespace BMA.EHR.Leave.Service.Controllers @@ -64,7 +63,6 @@ namespace BMA.EHR.Leave.Service.Controllers private readonly UserCalendarRepository _userCalendarRepository; private readonly PermissionRepository _permission; private readonly CheckInJobStatusRepository _checkInJobStatusRepository; - private readonly NotificationService _notificationService; private readonly CommandRepository _commandRepository; @@ -104,8 +102,7 @@ namespace BMA.EHR.Leave.Service.Controllers CheckInJobStatusRepository checkInJobStatusRepository, HttpClient httpClient, ApplicationDBContext appDbContext, - LeaveProcessJobStatusRepository leaveProcessJobStatusRepository, - NotificationService notificationService) + LeaveProcessJobStatusRepository leaveProcessJobStatusRepository) { _dutyTimeRepository = dutyTimeRepository; _context = context; @@ -125,7 +122,6 @@ namespace BMA.EHR.Leave.Service.Controllers _notificationRepository = notificationRepository; _checkInJobStatusRepository = checkInJobStatusRepository; _leaveProcessJobStatusRepository = leaveProcessJobStatusRepository; - _notificationService = notificationService; _objectPool = objectPool; _permission = permission; @@ -450,30 +446,29 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> CheckTimeAsync(CancellationToken cancellationToken = default) { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profileId = ProfileId ?? Guid.Empty; // Get user's last check-in record and profile in parallel var dataTask = _userTimeStampRepository.GetLastRecord(userId); - //var profileTask = _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profileTask = _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); var defaultRoundTask = _dutyTimeRepository.GetDefaultAsync(); - await Task.WhenAll(dataTask, defaultRoundTask); + await Task.WhenAll(dataTask, profileTask, defaultRoundTask); var data = await dataTask; - //var profile = await profileTask; + var profile = await profileTask; var getDefaultRound = await defaultRoundTask; - // if (profile == null) - // { - // throw new Exception(GlobalMessages.DataNotFound); - // } + if (profile == null) + { + throw new Exception(GlobalMessages.DataNotFound); + } if (getDefaultRound == null) { return Error("ไม่พบรอบลงเวลา Default", StatusCodes.Status404NotFound); } - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profileId); + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id); var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); @@ -536,18 +531,7 @@ namespace BMA.EHR.Leave.Service.Controllers // prepare data and convert request body and send to queue var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); var currentDate = DateTime.Now; - - // ตรวจสอบและ mark งานเก่าที่ค้างเกิน 30 นาทีเป็น FAILED อัตโนมัติ - var staleJobs = await _checkInJobStatusRepository.GetStalePendingOrProcessingJobsByUserAsync(userId, 30); - if (staleJobs != null && staleJobs.Count > 0) - { - foreach (var staleJob in staleJobs) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(staleJob.TaskId, - $"งานค้างในสถานะ {staleJob.Status} เกิน 30 นาที ระบบทำเครื่องหมายเป็น FAILED อัตโนมัติ"); - } - } - + // ตรวจสอบว่ามีงานที่กำลัง pending หรือ processing อยู่หรือไม่ var existingJobs = await _checkInJobStatusRepository.GetPendingOrProcessingJobsAsync(userId); if (existingJobs != null && existingJobs.Count > 0) @@ -555,10 +539,10 @@ namespace BMA.EHR.Leave.Service.Controllers // กรองเฉพาะงานที่เป็นประเภทเดียวกัน (CHECK_IN หรือ CHECK_OUT) var checkType = data.CheckInId == null ? "CHECK_IN" : "CHECK_OUT"; var sameTypeJob = existingJobs.FirstOrDefault(j => j.CheckType == checkType); - + if (sameTypeJob != null) { - + return Error($"มีงาน {checkType} กำลังดำเนินการอยู่", StatusCodes.Status500InternalServerError); // var timeDiff = (currentDate - sameTypeJob.CreatedDate).TotalMinutes; // if (timeDiff < 2) @@ -614,17 +598,8 @@ namespace BMA.EHR.Leave.Service.Controllers var properties = channel.CreateBasicProperties(); properties.Persistent = true; properties.MessageId = taskId; - - // ส่งไป RabbitMQ - channel.BasicPublish(exchange: "", - routingKey: queue, - basicProperties: properties, - body: body); - // Clear Byte data Before Save to DB - checkData.CheckInFileBytes = new byte[0]; - - // บันทึกสถานะงานหลังส่งไป RabbitMQ + // บันทึกสถานะงานก่อนส่งไป RabbitMQ jobStatus = new CheckInJobStatus { TaskId = Guid.Parse(taskId), @@ -633,10 +608,21 @@ namespace BMA.EHR.Leave.Service.Controllers Status = "PENDING", CheckType = data.CheckInId == null ? "CHECK_IN" : "CHECK_OUT", CheckInId = data.CheckInId, - AdditionalData = JsonConvert.SerializeObject(checkData) + AdditionalData = JsonConvert.SerializeObject(new + { + IsLocation = data.IsLocation, + LocationName = data.LocationName, + POI = data.POI + }) }; await _checkInJobStatusRepository.AddAsync(jobStatus); - + + // ส่งไป RabbitMQ + channel.BasicPublish(exchange: "", + routingKey: queue, + basicProperties: properties, + body: body); + return Success(new { date = currentDate, taskId = taskId, keycloakId = userId }); } catch (Exception ex) @@ -734,117 +720,6 @@ namespace BMA.EHR.Leave.Service.Controllers return Success(new { count = result.Count, jobs = result }); } - /// - /// ประมวลผลงาน CheckIn ที่ค้างอยู่ในสถานะ PENDING/PROCESSING เกินเวลาที่กำหนดใหม่อีกครั้ง - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("reprocess-stale-checkin-jobs")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> ReprocessStaleCheckInJobsAsync([FromQuery] int timeoutMinutes = 30) - { - try - { - var staleJobs = await _checkInJobStatusRepository.GetStalePendingOrProcessingJobsAsync(timeoutMinutes); - - if (staleJobs == null || staleJobs.Count == 0) - { - return Success(new { message = "ไม่พบงานที่ค้างอยู่", count = 0 }); - } - - var results = new List(); - foreach (var job in staleJobs) - { - try - { - // อ่านข้อมูลเดิมจาก AdditionalData - if (string.IsNullOrEmpty(job.AdditionalData)) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(job.TaskId, - "ไม่พบข้อมูลสำหรับประมวลผลซ้ำ (AdditionalData is null)"); - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - newStatus = "FAILED", - errorMessage = "ไม่พบข้อมูลสำหรับประมวลผลซ้ำ" - }); - continue; - } - - var checkData = JsonConvert.DeserializeObject(job.AdditionalData); - checkData.UserId = job.KeycloakUserId; - checkData.CurrentDate = job.CreatedDate; - if (checkData == null) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(job.TaskId, - "ไม่สามารถอ่านข้อมูลสำหรับประมวลผลซ้ำได้"); - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - newStatus = "FAILED", - errorMessage = "ไม่สามารถอ่านข้อมูลสำหรับประมวลผลซ้ำได้" - }); - continue; - } - - // ตั้ง TaskId ให้ตรงกับ job เดิม - checkData.TaskId = job.TaskId; - - // เรียก ProcessCheckInAsync ด้วยข้อมูลเดิม - var processResult = await ProcessCheckInAsync(checkData); - - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - result = processResult - }); - } - catch (Exception ex) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(job.TaskId, - $"เกิดข้อผิดพลาดในการประมวลผลซ้ำ: {ex.Message}"); - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - newStatus = "FAILED", - errorMessage = ex.Message - }); - } - } - - return Success(new - { - message = $"ประมวลผลซ้ำงาน {staleJobs.Count} รายการเสร็จสิ้น", - count = staleJobs.Count, - jobs = results - }); - } - catch (Exception ex) - { - return Error(ex); - } - } - [HttpGet("check-status")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] @@ -1063,31 +938,26 @@ namespace BMA.EHR.Leave.Service.Controllers await _checkInJobStatusRepository.UpdateToProcessingAsync(taskId); } - var profile = await _userProfileRepository.GetProfileByCheckInAsync(userId, data.Token); + var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, data.Token); if (profile == null) { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "เกิดข้อผิดพลาดจากการเรียก API [GetProfileByCheckInAsync] : ไม่พบข้อมูลผู้ใช้"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจาก ไม่พบข้อมูลผู้ใช้ \r\nกรุณาลองใหม่อีกครั้ง"); + await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบข้อมูลผู้ใช้"); //var staffList = await _userProfileRepository.GetOCStaffAsync(profile) return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } var currentDate = data.CurrentDate ?? DateTime.Now; - if (data.CheckInFileName == "no-file") + if (data.CheckInFileName == "no-file") { //throw new Exception(GlobalMessages.NoFileToUpload); await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, GlobalMessages.NoFileToUpload); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจาก {GlobalMessages.NoFileToUpload}\r\nกรุณาลองใหม่อีกครั้ง"); // send notification to user var noti1 = new Notification { - Body = - $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจาก {GlobalMessages.NoFileToUpload}", + Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจาก {GlobalMessages.NoFileToUpload}", ReceiverUserId = profile.Id, Type = "", Payload = "", @@ -1097,54 +967,45 @@ namespace BMA.EHR.Leave.Service.Controllers return Error(GlobalMessages.NoFileToUpload, StatusCodes.Status400BadRequest); } - + // last check-in record var lastCheckIn = await _userTimeStampRepository.GetLastRecord(userId); var check_status = data.CheckInId == null ? "check-in-picture" : "check-out-picture"; var check_out_status = "check-out-picture"; - // ถ้าไม่มี CheckInFileBytes ให้ใช้ภาพ blank.jpeg แทน - var fileBytes = data.CheckInFileBytes; - if (fileBytes == null || fileBytes.Length == 0) - { - var blankPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "blank.jpeg"); - fileBytes = await System.IO.File.ReadAllBytesAsync(blankPath); - data.CheckInFileName = "blank.jpeg"; - } - - var fileName = - $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_status}/{data.CheckInFileName}"; - var fileNameCheckOut = - $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_out_status}/{data.CheckInFileName}"; - using (var ms = new MemoryStream(fileBytes)) + var fileName = $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_status}/{data.CheckInFileName}"; + var fileNameCheckOut = $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_out_status}/{data.CheckInFileName}"; + using (var ms = new MemoryStream(data.CheckInFileBytes ?? new byte[0])) { try { await _minIOService.UploadFileAsync(fileName, ms); + // if (lastCheckIn != null && lastCheckIn.CheckOut == null) + // { + // // ยังไม่เคย check-out มาก่อน หรือ check-out เป็น null ให้ใช้ชื่อไฟล์แบบ check-out + // await _minIOService.UploadFileAsync(fileNameCheckOut, ms); + // } } catch (Exception ex) { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, - $"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}\r\nกรุณาลองใหม่อีกครั้ง"); + await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, $"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}"); // send notification to user - var noti2 = new Notification + var noti1 = new Notification { - Body = - $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}", + Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}", ReceiverUserId = profile.Id, Type = "", Payload = "", }; - _appDbContext.Set().Add(noti2); + _appDbContext.Set().Add(noti1); await _appDbContext.SaveChangesAsync(); - return Error($"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}", - StatusCodes.Status500InternalServerError); + + return Error($"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}", StatusCodes.Status500InternalServerError); } + } if (lastCheckIn != null && lastCheckIn.CheckOut == null) @@ -1154,38 +1015,39 @@ namespace BMA.EHR.Leave.Service.Controllers try { await _minIOService.UploadFileAsync(fileNameCheckOut, ms2); + // if (lastCheckIn != null && lastCheckIn.CheckOut == null) + // { + // // ยังไม่เคย check-out มาก่อน หรือ check-out เป็น null ให้ใช้ชื่อไฟล์แบบ check-out + // await _minIOService.UploadFileAsync(fileNameCheckOut, ms); + // } } catch (Exception ex) { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, - $"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}\r\nกรุณาลองใหม่อีกครั้ง"); + await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, $"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}"); // send notification to user - var noti3 = new Notification + var noti1 = new Notification { - Body = - $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}", + Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}", ReceiverUserId = profile.Id, Type = "", Payload = "", }; - _appDbContext.Set().Add(noti3); + _appDbContext.Set().Add(noti1); await _appDbContext.SaveChangesAsync(); - return Error($"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}", - StatusCodes.Status500InternalServerError); + + return Error($"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}", StatusCodes.Status500InternalServerError); } + } } + var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); if (defaultRound == null) { await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบรอบการลงเวลาทำงาน Default"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบรอบการลงเวลาทำงาน Default\r\nกรุณาลองใหม่อีกครั้ง"); // send notification to user var noti1 = new Notification { @@ -1339,12 +1201,11 @@ namespace BMA.EHR.Leave.Service.Controllers if (currentCheckIn != null) { await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่สามารถลงเวลาได้ เนื่องจากมีการลงเวลาในวันนี้แล้ว"); - await _notificationService.SendNotificationAsync(data.Token, true,$"ลงเวลาไม่สำเร็จ \r\nเนื่องจากมีการลงเวลาในวันนี้แล้ว\r\nกรุณาลองใหม่อีกครั้ง"); // send notification to user var noti1 = new Notification { - Body = $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากมีการลงเวลาในวันนี้แล้ว", + Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากมีการลงเวลาในวันนี้แล้ว", ReceiverUserId = profile.Id, Type = "", Payload = "", @@ -1497,7 +1358,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (checkout == null) { await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบข้อมูลการลงเวลาทำงาน"); - await _notificationService.SendNotificationAsync(data.Token,true, $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการลงเวลาทำงาน\r\nกรุณาลองใหม่อีกครั้ง"); // send notification to user var noti1 = new Notification @@ -1518,7 +1378,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (currentCheckInProcess == null) { await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบข้อมูลการประมวลผลเวลาทำงาน (CheckIn)"); - await _notificationService.SendNotificationAsync(data.Token, true, $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการประมวลผลเวลาทำงาน (CheckIn)\r\nกรุณาลองใหม่อีกครั้ง"); // send notification to user var noti1 = new Notification @@ -1696,7 +1555,6 @@ namespace BMA.EHR.Leave.Service.Controllers else { await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบข้อมูลการประมวลผลเวลาทำงาน"); - await _notificationService.SendNotificationAsync(data.Token,true, $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการประมวลผลเวลาทำงาน\r\nกรุณาลองใหม่อีกครั้ง"); // send notification to user var noti1 = new Notification { @@ -1720,8 +1578,6 @@ namespace BMA.EHR.Leave.Service.Controllers ProcessedDate = currentDate }); await _checkInJobStatusRepository.UpdateToCompletedAsync(taskId, additionalData); - await _notificationService.SendNotificationAsync(data.Token, false, - $"ลงเวลาสำเร็จ"); } var checkInType = data.CheckInId == null ? "check-in" : "check-out"; @@ -1733,7 +1589,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (taskId != Guid.Empty) { await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, ex.Message); - await _notificationService.SendNotificationAsync(data.Token, true, ex.Message); } return Error(ex); } @@ -2079,7 +1934,7 @@ namespace BMA.EHR.Leave.Service.Controllers ProfileType = d.ProfileType ?? "", CheckInDate = d.CheckIn.Date, - CheckInTime = d.CheckIn.ToString("HH:mm"), + CheckInTime = d.CheckIn.ToString("HH:mm:ss"), CheckInLocation = d.CheckInPOI, CheckInLat = d.CheckInLat, CheckInLon = d.CheckInLon, @@ -2090,7 +1945,7 @@ namespace BMA.EHR.Leave.Service.Controllers CheckInLocationName = d.CheckInLocationName ?? "", CheckOutDate = d.CheckOut?.Date, - CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm"), + CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm:ss"), CheckOutLocation = d.CheckOut == null ? "" : d.CheckOutPOI, CheckOutLat = d.CheckOut == null ? null : d.CheckOutLat, CheckOutLon = d.CheckOut == null ? null : d.CheckOutLon, @@ -3155,8 +3010,6 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status500InternalServerError)] public async Task> CheckoutCheckAsync(string isSeminar = "N") { - // "S" = Seminar, "N" = Normal, "O" = One Stop Service - var time = DateTime.Now; var userId = UserId != null ? Guid.Parse(UserId) : Guid.Empty; @@ -3188,11 +3041,9 @@ namespace BMA.EHR.Leave.Service.Controllers //var endTime = DateTimeOffset.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00").ToLocalTime().DateTime; - //var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00"); - var endTime = isSeminar.Trim().ToUpper() == "S" +  //var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00"); + var endTime = isSeminar.Trim().ToUpper() == "Y" ? DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} 14:30") - : isSeminar.Trim().ToUpper() == "O" - ? DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} 18:30") : DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}"); var endTimeMorning = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}"); @@ -3280,17 +3131,8 @@ namespace BMA.EHR.Leave.Service.Controllers { return Error("ไม่สามารถขอลงเวลากรณีพิเศษในวันที่มากกว่าวันที่ปัจจุบันได้", StatusCodes.Status400BadRequest); } - - var userId = UserId != null ? Guid.Parse(UserId) : Guid.Empty; - - var checkin = await _userTimeStampRepository.GetTimestampByDateAsync(userId, req.CheckDate.Date); - if (checkin != null && checkin.CheckOut == null) - { - return Error("ระบบพบรายการลงเวลาของวันที่ต้องการแก้ไข แต่ยังไม่มีข้อมูลการลงเวลาออก กรุณาลงเวลาออกให้เรียบร้อยก่อนดำเนินการ"); - } - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); if (profile == null) { @@ -3338,7 +3180,7 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetAdditionalCheckRequestAsync([Required] DateTime startDate, [Required] DateTime endDate, [Required] int page = 1, [Required] int pageSize = 10, string keyword = "", string? sortBy = "", bool? descending = false,string? status = "") + public async Task> GetAdditionalCheckRequestAsync([Required] int year, [Required] int month, [Required] int page = 1, [Required] int pageSize = 10, string keyword = "", string? sortBy = "", bool? descending = false) { var jsonData = await _permission.GetPermissionWithActingAPIAsync("LIST", "SYS_CHECKIN_SPECIAL"); //var jsonData = JsonConvert.DeserializeObject(getPermission); @@ -3383,7 +3225,7 @@ namespace BMA.EHR.Leave.Service.Controllers } //var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequests(year, month); - var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole2(startDate, endDate, role, nodeId, profileAdmin?.Node, keyword,status); + var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole(year, month, role, nodeId, profileAdmin?.Node, keyword); // ถ้ามีการรักษาการ if (jsonData.result.isAct) @@ -3451,7 +3293,7 @@ namespace BMA.EHR.Leave.Service.Controllers actNode = 0; } - var rawDataAct = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole2(startDate, endDate, actRole, actNodeId, profileAdmin?.Node, keyword,status); + var rawDataAct = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole(year, month, actRole, actNodeId, profileAdmin?.Node, keyword); if (rawDataAct != null) { if (rawData != null) @@ -3967,10 +3809,6 @@ namespace BMA.EHR.Leave.Service.Controllers "ABSENT" : "NORMAL", CheckOutDescription = d.CheckOutRemark ?? "", - IsLocationCheckIn = d.IsLocationCheckIn, - IsLocationCheckOut = d.IsLocationCheckOut, - CheckInLocationName = d.CheckInLocationName ?? "", - CheckOutLocationName = d.CheckOutLocationName ?? "" }; return Success(result); @@ -4035,7 +3873,6 @@ namespace BMA.EHR.Leave.Service.Controllers { resultCheckInDate = checkInData == null ? null : checkInData.CheckIn; resultCheckInTime = checkInData == null ? "00:00" : checkInData.CheckIn.ToString("HH:mm"); - resultCheckInLocation = checkInData == null ? "" : checkInData!.CheckInPOI; } if (data.CheckOutEdit) @@ -4053,7 +3890,6 @@ namespace BMA.EHR.Leave.Service.Controllers resultCheckOutTime = checkInData == null ? "00:00" : checkInData.CheckOut == null ? "00:00" : checkInData.CheckOut.Value.ToString("HH:mm"); - resultCheckOutLocation = checkInData == null ? "" : checkInData!.CheckOutPOI; } diff --git a/BMA.EHR.Leave/Controllers/LeaveReportController.cs b/BMA.EHR.Leave/Controllers/LeaveReportController.cs index 1b76947c..8ced9487 100644 --- a/BMA.EHR.Leave/Controllers/LeaveReportController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveReportController.cs @@ -157,14 +157,14 @@ namespace BMA.EHR.Leave.Service.Controllers data.Type.Id, data.CreatedAt); var startFiscalYear = (new DateTime(data.LeaveStartDate.Year - 1, 10, 1)).Date; - var endFiscalYear = (data.DateSendLeave ?? data.CreatedAt); + var endFiscalYear = (data.DateSendLeave ?? data.CreatedAt).Date; var thisYear = data.LeaveStartDate.Year; var toDay = data.LeaveStartDate.Date; if (toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31)) thisYear = thisYear + 1; var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser2Async(thisYear, data.Type.Id, data.KeycloakUserId); - var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUserBefore(data.KeycloakUserId, data.Type.Id, startFiscalYear, endFiscalYear); + var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser2(data.KeycloakUserId, data.Type.Id, startFiscalYear, endFiscalYear); if (leaveData != null) { sumLeave += leaveData.BeginningLeaveDays; @@ -217,8 +217,6 @@ namespace BMA.EHR.Leave.Service.Controllers leaveNumber = data.LeaveNumber.ToThaiNumber(), LeaveLastStart = lastLeaveRequest == null ? "" : lastLeaveRequest.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), LeaveLastEnd = lastLeaveRequest == null ? "" : lastLeaveRequest.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - - LeaveLastTotal = lastLeaveRequest == null ? "0".ToThaiNumber() : lastLeaveRequest.LeaveTotal.ToString().ToThaiNumber(), LeaveSummary = sumLeave.ToString().ToThaiNumber(), LeaveRemain = (data.Type.Limit - sumLeave).ToString().ToThaiNumber(), @@ -348,7 +346,7 @@ namespace BMA.EHR.Leave.Service.Controllers //var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser(data.KeycloakUserId, data.Type.Id, startFiscalYear, endFiscalYear); - var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUserBefore(data.KeycloakUserId, data.Type.Id, startFiscalYear, endFiscalYear); + var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser2(data.KeycloakUserId, data.Type.Id, startFiscalYear, endFiscalYear); if (leaveData != null) { sumLeave += leaveData.BeginningLeaveDays; @@ -1354,7 +1352,7 @@ namespace BMA.EHR.Leave.Service.Controllers } else { - profile = await _userProfileRepository.GetEmployeeByAdminRolev2(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); + profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); } // get leave day var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate); @@ -1677,22 +1675,18 @@ namespace BMA.EHR.Leave.Service.Controllers agencyCount = agencyCount, coupleCount = coupleCount, therapyCount = therapyCount, - - // ระบบนับจำนวนครั้ง วันลาพักผ่อนด้วย ซึ่งตามระเบียบไม่ให้นับจำนวนครั้งวันลาพักผ่อนครับ จำนวนครั้งนับเฉพาะ ป่วย กับ กิจ - leaveTotal = sickCount + - personalCount - // leaveTotal = sickCount + - // maternityCount + - // wifeCount + - // personalCount + - // restCount + - // ordainCount + - // absentCount + - // studyCount + - // agencyCount + - // coupleCount + - // therapyCount + leaveTotal = sickCount + + maternityCount + + wifeCount + + personalCount + + restCount + + ordainCount + + absentCount + + studyCount + + agencyCount + + coupleCount + + therapyCount }; @@ -2382,7 +2376,7 @@ namespace BMA.EHR.Leave.Service.Controllers } else { - profile = await _userProfileRepository.GetEmployeeByAdminRolev2(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); + profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); } // Child กรองตามที่ fe ส่งมาอีกชั้น if ((role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT" || role == "BROTHER") /*&& req.node > profileAdmin?.Node*/) @@ -2446,15 +2440,6 @@ namespace BMA.EHR.Leave.Service.Controllers var workTotal = 0; var seminarTotal = 0; - var wfaTotal = 0; //ปฏิบัติงานนอกสถานที่ - var outOfficeTotal = 0; //ขออนุญาติิิออกนอกสถานที่ - var oneStopSrvrTotal = 0; //จุดบริการด่วนมหานคร - var otherTotal = 0; //อื่นๆ - - - - - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); if (defaultRound == null) { @@ -2638,19 +2623,10 @@ namespace BMA.EHR.Leave.Service.Controllers workTotal += 1; if (!timeStamps.IsLocationCheckIn) { - if (timeStamps.CheckInLocationName!.Contains("ปฏิบัติงานที่บ้าน")) + if (timeStamps.CheckInLocationName == "ปฏิบัติงานที่บ้าน") wfhTotal += 1; else if (timeStamps.CheckInLocationName == "ไปประชุม / อบรม / สัมมนา") seminarTotal += 1; - else if (timeStamps.CheckInLocationName.Contains("ปฏิบัติงานนอกสถานที่")) - wfaTotal += 1; - else if (timeStamps.CheckInLocationName.Contains("ขออนุญาตออกนอกสถานที่")) - outOfficeTotal += 1; - else if (timeStamps.CheckInLocationName.Contains("ปฏิบัติงานในจุดบริการด่วนมหานคร")) - oneStopSrvrTotal += 1; - else otherTotal += 1; - // else if (timeStamps.CheckInLocationName.Contains("อื่นๆ")) - // otherTotal += 1; } } @@ -2801,36 +2777,19 @@ namespace BMA.EHR.Leave.Service.Controllers worksheet.Cells[lastRow + 2, 8].Value = "อบรม ประชุม สัมมนาฯ"; worksheet.Cells[lastRow + 2, 9].Value = seminarTotal; worksheet.Cells[lastRow + 2, 10].Value = "คน"; - worksheet.Cells[lastRow + 3, 8].Value = "ปฎิบัติงานนอกสถานที่"; - worksheet.Cells[lastRow + 3, 9].Value = wfaTotal; - worksheet.Cells[lastRow + 3, 10].Value = "คน"; - worksheet.Cells[lastRow + 4, 8].Value = "ขออนุญาตออกนอกสถานที่"; - worksheet.Cells[lastRow + 4, 9].Value = outOfficeTotal; - worksheet.Cells[lastRow + 4, 10].Value = "คน"; - worksheet.Cells[lastRow + 5, 8].Value = "ปฎิบัติงานในจุดบริการด่วนมหานคร"; - worksheet.Cells[lastRow + 5, 9].Value = oneStopSrvrTotal; - worksheet.Cells[lastRow + 5, 10].Value = "คน"; - worksheet.Cells[lastRow + 6, 8].Value = "อื่นๆ"; - worksheet.Cells[lastRow + 6, 9].Value = otherTotal; - worksheet.Cells[lastRow + 6, 10].Value = "คน"; - - - - - worksheet.Cells[lastRow + 3, 2].Value = "ลาป่วย/ลากิจ"; worksheet.Cells[lastRow + 3, 5].Value = sickTotal; worksheet.Cells[lastRow + 3, 6].Value = "คน"; worksheet.Cells[lastRow + 4, 2].Value = "มาสาย"; worksheet.Cells[lastRow + 4, 5].Value = lateTotal; worksheet.Cells[lastRow + 4, 6].Value = "คน"; - worksheet.Cells[lastRow + 8, 2].Value = "เรียน"; - worksheet.Cells[lastRow + 9, 2].Value = "เพื่อโปรดทราบ"; - worksheet.Cells[lastRow + 9, 9].Value = "ทราบ"; - worksheet.Cells[lastRow + 9, 9].Style.Font.Bold = true; - worksheet.Cells[lastRow + 9, 9].Style.Font.Size = 22; - worksheet.Cells[lastRow + 10, 2].Value = "................................"; - worksheet.Cells[lastRow + 10, 9].Value = "................................"; + worksheet.Cells[lastRow + 6, 2].Value = "เรียน"; + worksheet.Cells[lastRow + 7, 2].Value = "เพื่อโปรดทราบ"; + worksheet.Cells[lastRow + 7, 9].Value = "ทราบ"; + worksheet.Cells[lastRow + 7, 9].Style.Font.Bold = true; + worksheet.Cells[lastRow + 7, 9].Style.Font.Size = 22; + worksheet.Cells[lastRow + 8, 2].Value = "................................"; + worksheet.Cells[lastRow + 8, 9].Value = "................................"; worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns(); var fileBytes = package.GetAsByteArray(); return File(fileBytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "TimeStampRecords.xlsx"); diff --git a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs index 5fbca2cc..daa2c07c 100644 --- a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs @@ -175,9 +175,6 @@ namespace BMA.EHR.Leave.Service.Controllers LastUpdateFullName = FullName ?? "", LastUpdateUserId = UserId!, LastUpdatedAt = DateTime.Now, - - IsAct = r.isAct, - KeyId = r.keyId }); } @@ -946,8 +943,8 @@ namespace BMA.EHR.Leave.Service.Controllers OrganizationName = orgName, //profile.Oc ?? "", LeaveLimit = leaveLimit, // จำนวนวันลาทั้งหมดในปีนั้นๆที่ลาได้ โดยรวมยอดที่เหลือจากปีก่อนมา (เอาค่ามาจากตาราง Beginning เลย) - LeaveTotal = sumLeave ?? 0, // จำนวนวันลาที่ลาไปแล้วในปีนั้นๆ โดยเมื่อมีการอนุมัติลา จะมาบวกค่านี้ไปเรื่อยๆ (เอาค่ามาจากตาราง Beginning เลย) - LeaveRemain = leaveLimit - (sumLeave ?? 0), + LeaveTotal = sumLeave, // จำนวนวันลาที่ลาไปแล้วในปีนั้นๆ โดยเมื่อมีการอนุมัติลา จะมาบวกค่านี้ไปเรื่อยๆ (เอาค่ามาจากตาราง Beginning เลย) + LeaveRemain = leaveLimit - sumLeave, RestDayTotalOld = restOldDay, // เอา leaveLimit มาลบ 10 (LV-005) RestDayTotalCurrent = restCurrentDay,// 10 วันเสมอ (LV-005) BirthDate = profile.BirthDate.Date, @@ -1706,11 +1703,7 @@ namespace BMA.EHR.Leave.Service.Controllers var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUserAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId); - - var restDayOld = 0.0; - - //restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays + leaveData.BeginningLeaveDays - 10); - restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays - 10); + var restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays + leaveData.BeginningLeaveDays - 10); if (restDayOld < 0) restDayOld = 0; var restDayCurrent = govAge < 180 ? 0 : 10; @@ -2134,45 +2127,6 @@ namespace BMA.EHR.Leave.Service.Controllers return Success(); } - /// - /// API ลบรายการการลา (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteLeaveRequestForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_LEAVE_LIST"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการขอลา", StatusCodes.Status403Forbidden); - } - - var deleted = await _leaveRequestRepository.GetByIdAsync(id); - if (deleted == null) - return Error(GlobalMessages.DataNotFound); - - // ห้ามลบเฉพาะสถานะ APPROVE, DELETING, DELETE - if (new[] { "APPROVE", "DELETING", "DELETE" }.Contains(deleted.LeaveStatus)) - { - return Error("ไม่สามารถลบรายการขอลาสถานะนี้ได้"); - } - - await _leaveRequestRepository.DeleteAsync(deleted); - return Success(); - } - /// /// LV2_014 - รายการขอยกเลิกการลา (ADMIN) /// @@ -2881,9 +2835,8 @@ namespace BMA.EHR.Leave.Service.Controllers var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser2Async(thisYear, rawData.Type.Id, rawData.KeycloakUserId); var startFiscalYear = new DateTime(rawData.LeaveStartDate.Year - 1, 10, 1); - var endFiscalYear = rawData.DateSendLeave ?? rawData.CreatedAt; + var endFiscalYear = rawData.CreatedAt; var endFiscalYear2 = new DateTime(rawData.LeaveStartDate.Year, 9, 30); - //var endFiscalYear3 = rawData.DateSendLeave ?? rawData.CreatedAt; var leaveSummary = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser2(rawData.KeycloakUserId, rawData.Type.Id, startFiscalYear, endFiscalYear); // วันลาแบบร่างและที่ยื่นลาไปแล้ว @@ -3034,10 +2987,7 @@ namespace BMA.EHR.Leave.Service.Controllers ApproveStatus = x.ApproveStatus, Comment = x.Comment, ProfileId = x.ProfileId, - KeycloakId = x.KeycloakId, - isAct = x.IsAct, - keyId = x.KeyId - + KeycloakId = x.KeycloakId }).ToList(); var approvers = rawData.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER") @@ -3052,10 +3002,7 @@ namespace BMA.EHR.Leave.Service.Controllers ApproveStatus = x.ApproveStatus, Comment = x.Comment, ProfileId = x.ProfileId, - KeycloakId = x.KeycloakId, - - isAct = x.IsAct, - keyId = x.KeyId + KeycloakId = x.KeycloakId }).ToList(); result.Approvers.AddRange(approvers); @@ -3125,7 +3072,6 @@ namespace BMA.EHR.Leave.Service.Controllers leaveBeginningDict.TryGetValue(leaveType.Id, out var leaveData); var approve = leaveData?.LeaveDaysUsed ?? 0; - var approveCount = leaveData?.LeaveCount ?? 0; // fix issue : SIT ระบบบันทึกการลา>> สิทธิ์การลา(โอนสิทธิ์การลา) #974 var extendLeave = 0.0; @@ -3148,7 +3094,6 @@ namespace BMA.EHR.Leave.Service.Controllers LeaveCountApprove = approve, LeaveCountReject = reject, LeaveCountDelete = delete, - LeaveCountApproveCount = approveCount, }; result.Add(data); } diff --git a/BMA.EHR.Leave/DTOs/LeaveBeginnings/EditLeaveBeginningDto.cs b/BMA.EHR.Leave/DTOs/LeaveBeginnings/EditLeaveBeginningDto.cs index a41aa9f2..524072ec 100644 --- a/BMA.EHR.Leave/DTOs/LeaveBeginnings/EditLeaveBeginningDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveBeginnings/EditLeaveBeginningDto.cs @@ -17,16 +17,16 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveBeginnings [Required, Comment("จำนวนวันลายกมา")] public double LeaveDays { get; set; } = 0.0; - [Comment("จำนวนวันลาที่ใช้ไป")] - public double? LeaveDaysUsed { get; set; } + [Required, Comment("จำนวนวันลาที่ใช้ไป")] + public double LeaveDaysUsed { get; set; } = 0.0; - [Comment("จำนวนครั้งที่ลาสะสม")] - public int? LeaveCount { get; set; } + [Required, Comment("จำนวนครั้งที่ลาสะสม")] + public int LeaveCount { get; set; } = 0; - [Required, Comment("จำนวนวันลายกมาก่อนใช้ระบบ")] + [Required, Comment("จำนวนวันลายกมา")] public double BeginningLeaveDays { get; set; } = 0.0; - [Comment("จำนวนครั้งที่ลายกมาก่อนใช้ระบบ")] + [Comment("จำนวนครั้งที่ลายกมา")] public int BeginningLeaveCount { get; set; } = 0; } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs index 8afa5ca1..e9bae1bd 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs @@ -174,8 +174,5 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string ApproveStatus { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty; - - public bool isAct { get; set; } = false; - public string keyId { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/LeaveRequestApproverDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/LeaveRequestApproverDto.cs index a542d393..b5ff27a5 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/LeaveRequestApproverDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/LeaveRequestApproverDto.cs @@ -37,11 +37,5 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest [JsonProperty("organizationName")] public string OrganizationName { get; set; } = string.Empty; - [JsonProperty("isAct")] - public bool isAct { get; set; } = false; - - [JsonProperty("keyId")] - public string keyId { get; set; } = string.Empty; - } } diff --git a/BMA.EHR.Leave/Program.cs b/BMA.EHR.Leave/Program.cs index 3dd83203..c4774831 100644 --- a/BMA.EHR.Leave/Program.cs +++ b/BMA.EHR.Leave/Program.cs @@ -23,7 +23,6 @@ using Hangfire.Common; using BMA.EHR.Application.Repositories.Leaves.TimeAttendants; using BMA.EHR.Leave.Service.Extensions; using BMA.EHR.Leave.Service.Services; -using BMA.EHR.Leave.Services; var builder = WebApplication.CreateBuilder(args); // ตั้ง TimeZone เป็น Asia/Bangkok ในโค้ด @@ -96,7 +95,6 @@ builder.Services.AddLeaveApplication(); builder.Services.AddPersistence(builder.Configuration); builder.Services.AddLeavePersistence(builder.Configuration); builder.Services.AddTransient(); -builder.Services.AddTransient(); // Configure HttpClient with increased timeout for long-running operations (e.g., RabbitMQ Management API) builder.Services.AddHttpClient(); @@ -198,20 +196,12 @@ if (manager != null) // ทำความสะอาดข้อมูล CheckIn Job Status ที่เก่ากว่า 30 วัน - รันทุกวันเวลา 02:00 น. manager.AddOrUpdate("ทำความสะอาดข้อมูล CheckIn Job Status", Job.FromExpression(x => x.CleanupOldJobsAsync(30)), "0 2 * * *", bangkokTimeZone); - // ตรวจสอบและ mark งาน CheckIn ที่ค้างเกิน 30 นาทีเป็น FAILED - รันทุก 15 นาที - // manager.AddOrUpdate("ตรวจสอบงาน CheckIn ที่ค้างเกินเวลา", Job.FromExpression(x => x.MarkStaleJobsAsFailedAsync(30)), "*/15 * * * *", - // new RecurringJobOptions - // { - // TimeZone = bangkokTimeZone, - // QueueName = "leave" - // }); - // - // manager.AddOrUpdate("ประมวลผลงานที่ค้างอยู่ในสถานะ Pending หรือ Processing", Job.FromExpression(x => x.ProcessPendingJobsAsync()), "0 3 * * *", - // new RecurringJobOptions - // { - // TimeZone = bangkokTimeZone, - // QueueName = "leave" // ← กำหนด queue - // }); + manager.AddOrUpdate("ประมวลผลงานที่ค้างอยู่ในสถานะ Pending หรือ Processing", Job.FromExpression(x => x.ProcessPendingJobsAsync()), "0 3 * * *", + new RecurringJobOptions + { + TimeZone = bangkokTimeZone, + QueueName = "leave" // ← กำหนด queue + }); } // apply migrations diff --git a/BMA.EHR.Leave/Services/NotificationService.cs b/BMA.EHR.Leave/Services/NotificationService.cs deleted file mode 100644 index 3ada008e..00000000 --- a/BMA.EHR.Leave/Services/NotificationService.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using System.Net.Http.Headers; -using System.Text; - -namespace BMA.EHR.Leave.Services; - -public class NotificationService -{ - private readonly IHttpClientFactory _httpClientFactory; - private readonly ILogger _logger; - private readonly IConfiguration _configuration; - - private const string NotifyEndpoint = "https://hrmsbkk.case-collection.com/api/v1/org/through-socket/notify-from-token"; - - public NotificationService(IHttpClientFactory httpClientFactory, ILogger logger, IConfiguration configuration) - { - _httpClientFactory = httpClientFactory; - _logger = logger; - _configuration = configuration; - } - - public async Task SendNotificationAsync(string? token, bool error, string message) - { - if (string.IsNullOrEmpty(token)) - { - _logger.LogWarning("Cannot send import notification: token is null or empty."); - return; - } - - try - { - var client = _httpClientFactory.CreateClient("default"); - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - - var payload = new - { - error, - message - }; - - var json = JsonConvert.SerializeObject(payload); - var content = new StringContent(json, Encoding.UTF8, "application/json"); - - var response = await client.PostAsync(NotifyEndpoint, content); - - if (!response.IsSuccessStatusCode) - { - var responseBody = await response.Content.ReadAsStringAsync(); - _logger.LogWarning("Import notification failed with status {StatusCode}: {Body}", response.StatusCode, responseBody); - } - } - catch (Exception ex) - { - _logger.LogError(ex, "Failed to send import notification: {Message}", ex.Message); - } - } -} diff --git a/BMA.EHR.Leave/appsettings.json b/BMA.EHR.Leave/appsettings.json index 84791566..7c098db0 100644 --- a/BMA.EHR.Leave/appsettings.json +++ b/BMA.EHR.Leave/appsettings.json @@ -23,15 +23,15 @@ "ExamConnection": "Server=192.168.1.63;User ID=root;Password=12345678;Port=3306;Database=hrms_exam;Allow User Variables=True;Convert Zero Datetime=True;Pooling=True;", "LeaveConnection": "Server=192.168.1.63;User ID=root;Password=12345678;Port=3306;Database=hrms_leave;Allow User Variables=True;Convert Zero Datetime=True;Pooling=True;" -// "DefaultConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=13306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;", -// "ExamConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=13306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;", -// "LeaveConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=13306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;" + // "DefaultConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;", + // "ExamConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=3306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;", + // "LeaveConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=3306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;" }, "Jwt": { "Key": "j7C9RO_p4nRtuwCH4z9Db_A_6We42tkD_p4lZtDrezc", "Issuer": "https://hrmsbkk-id.case-collection.com/realms/hrms" -// "Key": "xY2VR-EFvvNPsMs39u8ooVBWQL6mPwrNJOh3koJFTgU", -// "Issuer": "https://hrms-id.bangkok.go.th/realms/hrms" + // "Key": "xY2VR-EFvvNPsMs39u8ooVBWQL6mPwrNJOh3koJFTgU", + // "Issuer": "https://hrms-id.bangkok.go.th/realms/hrms" }, "EPPlus": { "ExcelPackage": { @@ -43,10 +43,6 @@ "AccessKey": "iwvzjyjgz0BKtLPmMpPu", "SecretKey": "Yv56vwctYdIspDknRJ46xztcBDzteGF3elZiDcAr", "BucketName": "hrms-fpt" -// "Endpoint": "https://hrms-s3.bangkok.go.th/", -// "AccessKey": "frappet", -// "SecretKey": "FPTadmin2357", -// "BucketName": "bma-ehr-fpt" }, "Protocol": "HTTPS", "Node": { @@ -58,11 +54,11 @@ "Password": "12345678", "Queue": "hrms-checkin-queue-dev", "URL": "http://192.168.1.63:9122/api/queues/%2F/" -// "Host": "172.27.17.68", -// "User": "admin", -// "Password": "admin123456", -// "Queue": "hrms-checkin-queue", -// "URL": "http://172.27.17.68:9122/api/queues/%2F/" + // "Host": "172.27.17.68", + // "User": "admin", + // "Password": "admin123456", + // "Queue": "hrms-checkin-queue", + // "URL": "http://172.27.17.68:9122/api/queues/%2F/" }, "Mail": { "Server": "mail.bangkok.go.th", @@ -76,10 +72,10 @@ "API": "https://hrmsbkk.case-collection.com/api/v1", "APIV2": "https://hrmsbkk.case-collection.com/api/v2", "VITE_URL_MGT": "https://hrmsbkk-mgt.case-collection.com", -// "Domain": "https://hrms.bangkok.go.th", -// "APIPROBATION": "https://hrms.bangkok.go.th/api/v1/probation", -// "API": "https://hrms.bangkok.go.th/api/v1", -// "APIV2": "https://hrms.bangkok.go.th/api/v2", -// "VITE_URL_MGT": "https://hrms-mgt.bangkok.go.th", + // "Domain": "https://hrms-exam.bangkok.go.th", + // "APIPROBATION": "https://hrms.bangkok.go.th/api/v1/probation", + // "API": "https://hrms.bangkok.go.th/api/v1", + // "APIV2": "https://hrms.bangkok.go.th/api/v2", + // "VITE_URL_MGT": "https://hrms-mgt.bangkok.go.th", "API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz" } diff --git a/BMA.EHR.Leave/wwwroot/blank.jpeg b/BMA.EHR.Leave/wwwroot/blank.jpeg deleted file mode 100644 index 2b153486..00000000 Binary files a/BMA.EHR.Leave/wwwroot/blank.jpeg and /dev/null differ diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index a8c2bd4c..ff010a2a 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -554,7 +554,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.positionAreaOld = org.result.positionArea; placementAppointment.PositionLevelOld = org.result.posLevelName; placementAppointment.PositionTypeOld = org.result.posTypeName; - placementAppointment.PositionNumberOld = org.result.posNo; + placementAppointment.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -676,7 +676,6 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.posMasterNo = req.posMasterNo; uppdated.position = req.positionName; uppdated.PositionExecutive = req.posExecutiveName; - uppdated.posExecutiveId = req.posExecutiveId; uppdated.positionExecutiveField = req.positionExecutiveField; uppdated.positionArea = req.positionArea; uppdated.positionField = req.positionField; @@ -1011,14 +1010,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionExecutive = p.PositionExecutive, positionExecutiveField = p.positionExecutiveField, positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -1227,14 +1222,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionExecutive = p.PositionExecutive, positionExecutiveField = p.positionExecutiveField, positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -1860,14 +1851,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionExecutive = p.PositionExecutive, positionExecutiveField = p.positionExecutiveField, positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -2029,8 +2016,6 @@ namespace BMA.EHR.Placement.Service.Controllers positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs index 12325ecb..971cd526 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs @@ -542,7 +542,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.positionOld = org.result.position; placementAppointment.PositionLevelOld = org.result.posLevelName; placementAppointment.PositionTypeOld = org.result.posTypeName; - placementAppointment.PositionNumberOld = org.result.posNo; + placementAppointment.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index b01cf975..fbb6e2de 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -1065,7 +1065,6 @@ namespace BMA.EHR.Placement.Service.Controllers person.positionId = req.positionId; person.posMasterNo = req.posMasterNo; person.positionName = req.positionName; - person.posExecutiveId = req.posExecutiveId; person.PositionExecutive = req.posExecutiveName; person.positionExecutiveField = req.positionExecutiveField; person.positionArea = req.positionArea; @@ -1454,10 +1453,6 @@ namespace BMA.EHR.Placement.Service.Controllers profile.posTypeName = null; profile.posLevelId = null; profile.posLevelName = null; - profile.PositionExecutive = null; - profile.posExecutiveId = null; - profile.positionArea = null; - profile.positionExecutiveField = null; // profile.PositionLevel = null; // profile.PositionType = null; @@ -1815,27 +1810,16 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpPost("recruit/report/excecute")] public async Task> PostReportExecuteRecruit([FromBody] ReportExecuteRequest req) { - Console.WriteLine($"[RecruitReportExcecute] Starting execution at {DateTime.Now}"); - try { - Console.WriteLine($"[RecruitReportExcecute] Request received with {req?.refIds?.Length ?? 0} refIds"); - var placementProfile = await _context.PlacementProfiles .Include(x => x.PlacementCertificates) .Include(x => x.PlacementEducations) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - Console.WriteLine($"[RecruitReportExcecute] Found {placementProfile?.Count ?? 0} placement profiles"); - if (placementProfile == null) - { - Console.Error.WriteLine("[RecruitReportExcecute] PlacementProfile is null - returning NotFound"); return NotFound(); - } - - Console.WriteLine("[RecruitReportExcecute] Building resultData from placement profiles and refIds"); var resultData = (from p in placementProfile join r in req.refIds @@ -1952,14 +1936,7 @@ namespace BMA.EHR.Placement.Service.Controllers bodyPosition = new { posmasterId = p.posmasterId, - positionId = p.positionId, - positionName = p.positionName, - positionField = p.positionField, - posTypeId = p.posTypeId, - posLevelId = p.posLevelId, - posExecutiveId = p.posExecutiveId, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, + positionId = p.positionId }, bodyMarry = new { @@ -1988,9 +1965,6 @@ namespace BMA.EHR.Placement.Service.Controllers }, }).ToList(); - Console.WriteLine($"[RecruitReportExcecute] resultData built successfully with {resultData?.Count ?? 0} records"); - - Console.WriteLine($"[RecruitReportExcecute] Calling external API: {_configuration["API"]}/org/command/excexute/create-officer-profile"); var apiUrl = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; using (var client = new HttpClient()) { @@ -2002,10 +1976,8 @@ namespace BMA.EHR.Placement.Service.Controllers data = resultData }); var _result = await _res.Content.ReadAsStringAsync(); - Console.WriteLine($"[RecruitReportExcecute] External API response status: {_res.StatusCode}"); if (_res.IsSuccessStatusCode) { - Console.WriteLine("[RecruitReportExcecute] External API call successful - updating placement profiles"); placementProfile.ForEach(profile => { profile.PlacementStatus = "DONE"; @@ -2019,24 +1991,14 @@ namespace BMA.EHR.Placement.Service.Controllers profile.templateDoc = req.refIds[0].remark; } }); - Console.WriteLine($"[RecruitReportExcecute] Saving changes to database for {placementProfile.Count} profiles"); await _context.SaveChangesAsync(); - Console.WriteLine("[RecruitReportExcecute] Database save completed successfully"); - } - else - { - Console.Error.WriteLine($"[RecruitReportExcecute] External API call failed with status: {_res.StatusCode}"); - Console.Error.WriteLine($"[RecruitReportExcecute] Response content: {_result}"); } } - Console.WriteLine($"[RecruitReportExcecute] Process completed successfully at {DateTime.Now}"); return Success(); } - catch (Exception ex) + catch { - Console.Error.WriteLine($"[RecruitReportExcecute] Error occurred: {ex.Message}"); - Console.Error.WriteLine($"[RecruitReportExcecute] Stack trace: {ex.StackTrace}"); throw; } } @@ -2198,11 +2160,8 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpPost("candidate/report/excecute")] public async Task> PostReportExecuteCandidate([FromBody] ReportExecuteRequest req) { - Console.WriteLine($"[CandidateReportExcecute] Starting execution at {DateTime.Now}"); - try { - Console.WriteLine($"[CandidateReportExcecute] Request received with {req?.refIds?.Length ?? 0} refIds"); var placementProfile = await _context.PlacementProfiles .Include(x => x.PlacementCertificates) .Include(x => x.PlacementEducations) @@ -2210,15 +2169,8 @@ namespace BMA.EHR.Placement.Service.Controllers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - Console.WriteLine($"[CandidateReportExcecute] Found {placementProfile?.Count ?? 0} placement profiles"); - if (placementProfile == null) - { - Console.Error.WriteLine("[CandidateReportExcecute] PlacementProfile is null - returning NotFound"); return NotFound(); - } - - Console.WriteLine("[CandidateReportExcecute] Building resultData from placement profiles and refIds"); var resultData = (from p in placementProfile join r in req.refIds @@ -2340,14 +2292,7 @@ namespace BMA.EHR.Placement.Service.Controllers bodyPosition = new { posmasterId = p.posmasterId, - positionId = p.positionId, - positionName = p.positionName, - positionField = p.positionField, - posTypeId = p.posTypeId, - posLevelId = p.posLevelId, - posExecutiveId = p.posExecutiveId, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, + positionId = p.positionId }, bodyMarry = new { @@ -2376,9 +2321,6 @@ namespace BMA.EHR.Placement.Service.Controllers }, }).ToList(); - Console.WriteLine($"[CandidateReportExcecute] resultData built successfully with {resultData?.Count ?? 0} records"); - - Console.WriteLine($"[CandidateReportExcecute] Calling external API: {_configuration["API"]}/org/command/excexute/create-officer-profile"); var apiUrl = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; using (var client = new HttpClient()) { @@ -2390,10 +2332,8 @@ namespace BMA.EHR.Placement.Service.Controllers data = resultData }); var _result = await _res.Content.ReadAsStringAsync(); - Console.WriteLine($"[CandidateReportExcecute] External API response status: {_res.StatusCode}"); if (_res.IsSuccessStatusCode) { - Console.WriteLine("[CandidateReportExcecute] External API call successful - updating placement profiles"); placementProfile.ForEach(profile => { profile.PlacementStatus = "DONE"; @@ -2407,27 +2347,17 @@ namespace BMA.EHR.Placement.Service.Controllers profile.templateDoc = req.refIds[0].remark; } }); - Console.WriteLine($"[CandidateReportExcecute] Saving changes to database for {placementProfile.Count} profiles"); await _context.SaveChangesAsync(); - Console.WriteLine("[CandidateReportExcecute] Database save completed successfully"); - } - else - { - Console.Error.WriteLine($"[CandidateReportExcecute] External API call failed with status: {_res.StatusCode}"); - Console.Error.WriteLine($"[CandidateReportExcecute] Response content: {_result}"); } } // // update placementstatus // placementProfile.ForEach(profile => profile.PlacementStatus = "DONE"); // await _context.SaveChangesAsync(); - Console.WriteLine($"[CandidateReportExcecute] Process completed successfully at {DateTime.Now}"); return Success(); } - catch (Exception ex) + catch { - Console.Error.WriteLine($"[CandidateReportExcecute] Error occurred: {ex.Message}"); - Console.Error.WriteLine($"[CandidateReportExcecute] Stack trace: {ex.StackTrace}"); throw; } } @@ -2611,11 +2541,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementProfiles .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.PlacementStatus = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -2629,14 +2554,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionExecutive = p.PositionExecutive, positionExecutiveField = p.positionExecutiveField, positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -2669,12 +2590,12 @@ namespace BMA.EHR.Placement.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => profile.PlacementStatus = "DONE"); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.PlacementStatus = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -2856,11 +2777,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementProfiles .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.PlacementStatus = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -2874,14 +2790,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionExecutive = p.PositionExecutive, positionExecutiveField = p.positionExecutiveField, positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -2914,12 +2826,12 @@ namespace BMA.EHR.Placement.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => profile.PlacementStatus = "DONE"); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.PlacementStatus = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -3086,11 +2998,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementProfiles .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.PlacementStatus = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -3108,8 +3015,6 @@ namespace BMA.EHR.Placement.Service.Controllers positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -3142,12 +3047,12 @@ namespace BMA.EHR.Placement.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// data.ForEach(profile => profile.PlacementStatus = "DONE"); - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.PlacementStatus = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs index baaafee2..c2033280 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs @@ -148,7 +148,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.child4OldId, p.child4ShortNameOld, p.PositionOld, - p.PositionNumberOld, p.PositionExecutiveOld, p.positionExecutiveFieldOld, p.positionAreaOld, @@ -494,7 +493,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementOfficer.positionAreaOld = org.result.positionArea; placementOfficer.PositionLevelOld = org.result.posLevelName; placementOfficer.PositionTypeOld = org.result.posTypeName; - placementOfficer.PositionNumberOld = org.result.posNo; + placementOfficer.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; placementOfficer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -759,17 +758,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementOfficers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var firstRef = req.refIds.FirstOrDefault(); - var commandNoText = firstRef != null ? $"{firstRef.commandNo}/{firstRef.commandYear.ToThaiYear()}" : null; - foreach (var profile in data) - { - profile.Status = "DONE"; - profile.commandNo = commandNoText; - } - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -821,16 +809,17 @@ namespace BMA.EHR.Placement.Service.Controllers { data = resultData, }); - //// var _result = await _res.Content.ReadAsStringAsync(); - //// if (_res.IsSuccessStatusCode) - //// { - //// foreach (var profile in data) - //// { - //// profile.Status = "DONE"; - //// profile.commandNo = resultData.Count > 0 ? $"{resultData[0].commandNo}/{resultData[0].commandYear.ToThaiYear()}" : null; - //// } - //// await _context.SaveChangesAsync(); - //// } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + //data.ForEach(profile => profile.Status = "DONE"); + foreach (var profile in data) + { + profile.Status = "DONE"; + profile.commandNo = resultData.Count > 0 ? $"{resultData[0].commandNo}/{resultData[0].commandYear.ToThaiYear()}" : null; + } + await _context.SaveChangesAsync(); + } } return Success(); } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs index 7ad56249..ab8a508e 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs @@ -129,7 +129,6 @@ namespace BMA.EHR.Placement.Service.Controllers { p.Id, p.prefix, - p.rank, p.firstName, p.lastName, p.citizenId, @@ -281,7 +280,6 @@ namespace BMA.EHR.Placement.Service.Controllers // ProfileId = p.Profile.Id, p.citizenId, p.prefix, - p.rank, p.firstName, p.lastName, p.DateOfBirth, @@ -379,7 +377,6 @@ namespace BMA.EHR.Placement.Service.Controllers // data.ProfileId, data.citizenId, data.prefix, - data.rank, data.firstName, data.lastName, data.DateOfBirth, @@ -487,7 +484,6 @@ namespace BMA.EHR.Placement.Service.Controllers // Profile = profile, citizenId = req.citizenId, prefix = req.prefix, - rank = req.rank, firstName = req.firstName, lastName = req.lastName, DateOfBirth = req.BirthDate, @@ -514,8 +510,9 @@ namespace BMA.EHR.Placement.Service.Controllers { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - Console.Write($"[PlacementReceiveController] Check-Citizen API-Key : {_configuration["API_KEY"]}"); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlCheckCitizen, new { @@ -540,7 +537,6 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - Console.Write("[PlacementReceiveController] Check-Position"); client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); @@ -590,7 +586,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementReceive.positionAreaOld = org.result.positionArea; placementReceive.PositionLevelOld = org.result.posLevelName; placementReceive.PositionTypeOld = org.result.posTypeName; - placementReceive.PositionNumberOld = org.result.posNo; + placementReceive.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; placementReceive.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -782,7 +778,6 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.posMasterNo = req.posMasterNo; uppdated.position = req.positionName; uppdated.PositionExecutive = req.posExecutiveName; - uppdated.posExecutiveId = req.posExecutiveId; uppdated.positionExecutiveField = req.positionExecutiveField; uppdated.positionArea = req.positionArea; uppdated.positionField = req.positionField; @@ -831,7 +826,7 @@ namespace BMA.EHR.Placement.Service.Controllers client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlCheckCitizen, new @@ -857,7 +852,6 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.Gender = req.Gender; uppdated.citizenId = req.citizenId; uppdated.prefix = req.prefix; - uppdated.rank = req.rank; uppdated.firstName = req.firstName; uppdated.lastName = req.lastName; uppdated.DateOfBirth = req.DateOfBirth; @@ -923,61 +917,6 @@ namespace BMA.EHR.Placement.Service.Controllers return Success(); } - /// - /// API ลบรายการรับโอน (ADMIN) - /// - /// Id รับโอน - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_TRANSFER_RECEIVE"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการรับโอน", StatusCodes.Status403Forbidden); - } - var deleted = await _context.PlacementReceives.AsQueryable() - .Include(x => x.PlacementReceiveDocs) - .ThenInclude(x => x.Document) - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return NotFound(); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE - if (new[] { "REPORT", "WAITING", "DONE" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการรับโอนสถานะนี้ได้"); - } - - var placementReceiveDocs = new List(); - foreach (var doc in deleted.PlacementReceiveDocs) - { - if (doc.Document != null) - placementReceiveDocs.Add(doc.Document.Id); - } - _context.PlacementReceiveDocs.RemoveRange(deleted.PlacementReceiveDocs); - await _context.SaveChangesAsync(); - _context.PlacementReceives.Remove(deleted); - foreach (var doc in placementReceiveDocs) - { - if (doc != null) - await _documentService.DeleteFileAsync(doc); - } - await _context.SaveChangesAsync(); - - return Success(); - } - - /// /// สั่งรายชื่อไปออกคำสั่ง /// @@ -1185,10 +1124,6 @@ namespace BMA.EHR.Placement.Service.Controllers .Include(x => x.Avatar) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1196,7 +1131,7 @@ namespace BMA.EHR.Placement.Service.Controllers { bodyProfile = new { - rank = string.IsNullOrEmpty(p.rank) ? string.Empty : p.rank, + rank = string.Empty, prefix = p.prefix == null ? string.Empty : p.prefix, firstName = p.firstName == null ? string.Empty : p.firstName, lastName = p.lastName == null ? string.Empty : p.lastName, @@ -1272,19 +1207,13 @@ namespace BMA.EHR.Placement.Service.Controllers }, bodyPosition = new { - posmasterId = p.posmasterId, - positionId = p.positionId, - positionName = p.position, - positionField = p.positionField, - posTypeId = p.posTypeId, - posLevelId = p.posLevelId, - posExecutiveId = p.posExecutiveId, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, + posmasterId = p.posmasterId, + positionId = p.positionId } }).ToList(); var baseAPIOrg = _configuration["API"]; + //var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; var apiUrlOrg = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; using (var client = new HttpClient()) { @@ -1294,12 +1223,12 @@ namespace BMA.EHR.Placement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs index e9c45532..5f5668b7 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs @@ -374,7 +374,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementRepatriation.positionAreaOld = org.result.positionArea; placementRepatriation.PositionLevelOld = org.result.posLevelName; placementRepatriation.PositionTypeOld = org.result.posTypeName; - placementRepatriation.PositionNumberOld = org.result.posNo; + placementRepatriation.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; placementRepatriation.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -623,10 +623,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementRepatriations .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -679,12 +675,12 @@ namespace BMA.EHR.Placement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs index a8786b51..3514e4a5 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs @@ -764,7 +764,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementTransfer.positionAreaOld = org.result.positionArea; placementTransfer.PositionLevelOld = org.result.posLevelName; placementTransfer.PositionTypeOld = org.result.posTypeName; - placementTransfer.PositionNumberOld = org.result.posNo; + placementTransfer.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; placementTransfer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -932,60 +932,6 @@ namespace BMA.EHR.Placement.Service.Controllers return Success(); } - /// - /// API ลบรายการคำขอโอน (ADMIN) - /// - /// Id คำขอโอน - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_TRANSFER_REQ"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการคำขอโอน", StatusCodes.Status403Forbidden); - } - var deleted = await _context.PlacementTransfers.AsQueryable() - .Include(x => x.PlacementTransferDocs) - .ThenInclude(x => x.Document) - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return NotFound(); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE - if (new[] { "REPORT", "WAITING", "DONE" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการคำขอโอนสถานะนี้ได้"); - } - - var placementTransferDocs = new List(); - foreach (var doc in deleted.PlacementTransferDocs) - { - if (doc.Document != null) - placementTransferDocs.Add(doc.Document.Id); - } - _context.PlacementTransferDocs.RemoveRange(deleted.PlacementTransferDocs); - await _context.SaveChangesAsync(); - _context.PlacementTransfers.Remove(deleted); - foreach (var doc in placementTransferDocs) - { - if (doc != null) - await _documentService.DeleteFileAsync(doc); - } - await _context.SaveChangesAsync(); - - return Success(); - } - /// /// สั่งรายชื่อไปออกคำสั่ง /// @@ -1148,10 +1094,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementTransfers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1204,12 +1146,12 @@ namespace BMA.EHR.Placement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } diff --git a/BMA.EHR.Placement.Service/Program.cs b/BMA.EHR.Placement.Service/Program.cs index bd4eb6e8..f954f343 100644 --- a/BMA.EHR.Placement.Service/Program.cs +++ b/BMA.EHR.Placement.Service/Program.cs @@ -21,7 +21,6 @@ using System.Text; using System.Transactions; using BMA.EHR.Placement.Service.Filters; using BMA.EHR.Application.Repositories.Reports; -using BMA.EHR.Application.Repositories; var builder = WebApplication.CreateBuilder(args); { @@ -165,8 +164,6 @@ var app = builder.Build(); if (manager != null) { manager.AddOrUpdate("แจ้งเตือนระบบทดลองงาน", Job.FromExpression(x => x.NotifyProbation()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); - // Job: อัพเดทสถานะผู้สอบผ่านที่ลาออกไปแล้วแต่ยังไม่ส่งไปออกคำสั่ง ทำงานทุกวันเวลา 05:00 น. - manager.AddOrUpdate("ประมวลผลข้าราชการฯ กทม.", Job.FromExpression(x => x.UpdateStatusPlacementProfiles()), Cron.Daily(5), TimeZoneInfo.Local); } // apply migrations diff --git a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs index 6fd3c148..c943bc53 100644 --- a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs @@ -53,7 +53,6 @@ namespace BMA.EHR.Placement.Service.Requests public double? Amount { get; set; } public string? avatarUrl { get; set; } public bool? isDeputy { get; set; } - public string? posNo { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs index e64444ed..8f6c31ba 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs @@ -30,7 +30,6 @@ namespace BMA.EHR.Placement.Service.Requests public string? posLevelName { get; set; } public string? typeCommand { get; set; } public string? posExecutiveName { get; set; } - public string? posExecutiveId { get; set; } public string? positionExecutiveField { get; set; } public string? positionArea { get; set; } } diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs index 29e5d096..9b22874b 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs @@ -30,7 +30,6 @@ namespace BMA.EHR.Placement.Service.Requests public string? posLevelName { get; set; } public string? typeCommand { get; set; } public string? posExecutiveName { get; set; } - public string? posExecutiveId { get; set; } public string? positionExecutiveField { get; set; } public string? positionArea { get; set; } } diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs index 681bc1d5..66042358 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs @@ -39,7 +39,6 @@ namespace BMA.EHR.Placement.Service.Requests public string? posLevelName { get; set; } public string? typeCommand { get; set; } public string? posExecutiveName { get; set; } - public string? posExecutiveId { get; set; } public string? positionExecutiveField { get; set; } public string? positionArea { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs index cafc0ad9..7c1cb172 100644 --- a/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs @@ -6,8 +6,7 @@ namespace BMA.EHR.Placement.Service.Requests public class PlacementReceiveEditRequest { public string citizenId { get; set; } - public string? prefix { get; set; } - public string? rank { get; set; } + public string prefix { get; set; } public string firstName { get; set; } public string lastName { get; set; } public DateTime DateOfBirth { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs index 49563324..b546c1f3 100644 --- a/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs @@ -6,9 +6,7 @@ namespace BMA.EHR.Placement.Service.Requests public class PlacementReceiveRequest { public string citizenId { get; set; } - - public string? prefix { get; set; } - public string? rank { get; set; } + public string prefix { get; set; } public string firstName { get; set; } public string lastName { get; set; } public DateTime BirthDate { get; set; } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 697af6eb..04a01f77 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -448,7 +448,7 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementOther.positionAreaOld = org.result.positionArea; retirementOther.PositionLevelOld = org.result.posLevelName; retirementOther.PositionTypeOld = org.result.posTypeName; - retirementOther.PositionNumberOld = org.result.posNo; + retirementOther.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; retirementOther.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -569,7 +569,6 @@ namespace BMA.EHR.Retirement.Service.Controllers uppdated.positionId = req.positionId; uppdated.posMasterNo = req.posMasterNo; uppdated.position = req.positionName; - uppdated.posExecutiveId = req.posExecutiveId; uppdated.PositionExecutive = req.posExecutiveName; uppdated.positionExecutiveField = req.positionExecutiveField; uppdated.positionArea = req.positionArea; @@ -846,10 +845,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var data = await _context.RetirementOthers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -890,9 +885,6 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, positionTypeNew = p.posTypeId, positionLevelNew = p.posLevelId, positionNameNew = p.position, @@ -922,12 +914,12 @@ namespace BMA.EHR.Retirement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -1098,10 +1090,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var data = await _context.RetirementOthers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -1142,9 +1130,6 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, positionTypeNew = p.posTypeId, positionLevelNew = p.posLevelId, positionNameNew = p.position, @@ -1174,12 +1159,12 @@ namespace BMA.EHR.Retirement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs index a8c9d8e2..ce8b0452 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs @@ -642,10 +642,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var data = await _context.RetirementOuts .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -705,12 +701,12 @@ namespace BMA.EHR.Retirement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs index 2dd451ab..147f1adb 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs @@ -151,7 +151,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); var retirementResigns = await _context.RetirementResigns.AsQueryable() - .Where(x => x.Status != "DELETE" && x.profileId == org.result.profileId) + .Where(x => x.profileId == org.result.profileId) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -1290,7 +1290,7 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementResign.positionAreaOld = org.result.positionArea; retirementResign.PositionLevelOld = org.result.posLevelName; retirementResign.PositionTypeOld = org.result.posTypeName; - retirementResign.PositionNumberOld = org.result.posNo; + retirementResign.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; retirementResign.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -1439,7 +1439,7 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementResign.positionAreaOld = org.result.positionArea; retirementResign.PositionLevelOld = org.result.posLevelName; retirementResign.PositionTypeOld = org.result.posTypeName; - retirementResign.PositionNumberOld = org.result.posNo; + retirementResign.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; retirementResign.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -1456,12 +1456,10 @@ namespace BMA.EHR.Retirement.Service.Controllers else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "อาวุโส") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ชำนาญการพิเศษ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "ต้น")) { retirementResign.Group = "1.2"; - retirementResign.ApproveStep = "st3"; } else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ทักษะพิเศษ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "เชี่ยวชาญ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ทรงคุณวุฒิ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "สูง") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "ต้น") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "สูง")) { retirementResign.Group = "2"; - retirementResign.ApproveStep = "st3"; } } await _context.RetirementResigns.AddAsync(retirementResign); @@ -1513,10 +1511,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error(GlobalMessages.RetirementResignNotFound, 404); updated.Location = req.Location; - if (req.SendDate != null) - { - updated.SendDate = req.SendDate; - } + updated.ActiveDate = req.ActiveDate; // updated.Reason = req.Reason; updated.Remark = req.Remark; updated.ReasonResign = req.Reason; @@ -1814,47 +1809,6 @@ namespace BMA.EHR.Retirement.Service.Controllers return Success(); } - /// - /// API ลบรายการลาออก (ADMIN) - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_RESIGN"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการลาออก", StatusCodes.Status403Forbidden); - } - var deleted = await _context.RetirementResigns.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return Error(GlobalMessages.RetirementResignNotFound, 404); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE, CANCELING, CANCEL - if (new[] { "REPORT", "WAITING", "DONE", "CANCELING", "CANCEL" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการลาออกสถานะนี้ได้"); - } - - deleted.Status = "DELETE"; - deleted.LastUpdateFullName = FullName ?? "System Administrator"; - deleted.LastUpdateUserId = UserId ?? ""; - deleted.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); - return Success(); - } - /// /// อนุมัติคำลาออก /// @@ -2907,10 +2861,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var data = await _context.RetirementResigns .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -2965,12 +2915,12 @@ namespace BMA.EHR.Retirement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -3110,11 +3060,6 @@ namespace BMA.EHR.Retirement.Service.Controllers .Include(x => x.RetirementResign) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - data.ForEach(profile => profile.RetirementResign.Status = "CANCEL"); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -3175,13 +3120,13 @@ namespace BMA.EHR.Retirement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // data.ForEach(profile => profile.RetirementResign.Status = "CANCEL"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + data.ForEach(profile => profile.RetirementResign.Status = "CANCEL"); + await _context.SaveChangesAsync(); + } } //} //else diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs index 064220d4..5ad00538 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs @@ -89,7 +89,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); var retirementResignEmployees = await _context.RetirementResignEmployees.AsQueryable() - .Where(x => x.Status != "DELETE" && x.profileId == org.result.profileId) + .Where(x => x.profileId == org.result.profileId) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -1227,7 +1227,7 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementResignEmployee.PositionOld = org.result.position; retirementResignEmployee.PositionLevelOld = org.result.posLevelName; retirementResignEmployee.PositionTypeOld = org.result.posTypeName; - retirementResignEmployee.PositionNumberOld = org.result.posNo; + retirementResignEmployee.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; retirementResignEmployee.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -1381,7 +1381,7 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementResignEmployee.PositionOld = org.result.position; retirementResignEmployee.PositionLevelOld = org.result.posLevelName; retirementResignEmployee.PositionTypeOld = org.result.posTypeName; - retirementResignEmployee.PositionNumberOld = org.result.posNo; + retirementResignEmployee.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; retirementResignEmployee.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -1450,10 +1450,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error(GlobalMessages.RetirementResignEmployeeNotFound, 404); updated.Location = req.Location; - if (req.SendDate != null) - { - updated.SendDate = req.SendDate; - } + updated.ActiveDate = req.ActiveDate; // updated.Reason = req.Reason; updated.Remark = req.Remark; updated.ReasonResign = req.Reason; @@ -1722,47 +1719,6 @@ namespace BMA.EHR.Retirement.Service.Controllers return Success(); } - /// - /// API ลบรายการลาออกลูกจ้าง (ADMIN) - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_RESIGN_EMP"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการลาออกลูกจ้าง", StatusCodes.Status403Forbidden); - } - var deleted = await _context.RetirementResignEmployees.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return Error(GlobalMessages.RetirementResignEmployeeNotFound, 404); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE, CANCELING, CANCEL - if (new[] { "REPORT", "WAITING", "DONE", "CANCELING", "CANCEL" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการลาออกลูกจ้างสถานะนี้ได้"); - } - - deleted.Status = "DELETE"; - deleted.LastUpdateFullName = FullName ?? "System Administrator"; - deleted.LastUpdateUserId = UserId ?? ""; - deleted.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); - return Success(); - } - /// /// อนุมัติคำลาออก /// @@ -2405,10 +2361,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var data = await _context.RetirementResignEmployees .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - await _context.SaveChangesAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -2461,12 +2413,12 @@ namespace BMA.EHR.Retirement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } return Success(); } @@ -2604,11 +2556,6 @@ namespace BMA.EHR.Retirement.Service.Controllers .Include(x => x.RetirementResignEmployee) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - // Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - data.ForEach(profile => profile.Status = "DONE"); - data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL"); - await _context.SaveChangesAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2668,13 +2615,13 @@ namespace BMA.EHR.Retirement.Service.Controllers { data = resultData, }); - // // var _result = await _res.Content.ReadAsStringAsync(); - // // if (_res.IsSuccessStatusCode) - // // { - // // data.ForEach(profile => profile.Status = "DONE"); - // // data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL"); - // // await _context.SaveChangesAsync(); - // // } + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL"); + await _context.SaveChangesAsync(); + } } //} //else diff --git a/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs b/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs index 44c2da54..8252d1af 100644 --- a/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs @@ -29,7 +29,6 @@ namespace BMA.EHR.Retirement.Service.Requests public string? posLevelId { get; set; } public string? posLevelName { get; set; } public string? typeCommand { get; set; } - public string? posExecutiveId { get; set; } public string? posExecutiveName { get; set; } public string? positionExecutiveField { get; set; } public string? positionArea { get; set; } diff --git a/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs b/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs index e1b1a3cf..dd883d0d 100644 --- a/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs @@ -6,7 +6,7 @@ namespace BMA.EHR.Retirement.Service.Requests public class RetirementResignEmployeeRequest { public string? Location { get; set; } - public DateTime? SendDate { get; set; } + // public DateTime? SendDate { get; set; } public DateTime? ActiveDate { get; set; } public string? Reason { get; set; } public string? Remark { get; set; } diff --git a/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs b/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs index e862e6dd..acef05aa 100644 --- a/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs @@ -6,7 +6,7 @@ namespace BMA.EHR.Retirement.Service.Requests public class RetirementResignRequest { public string? Location { get; set; } - public DateTime? SendDate { get; set; } + // public DateTime? SendDate { get; set; } public DateTime? ActiveDate { get; set; } public string? Reason { get; set; } public string? Remark { get; set; } diff --git a/README.md b/README.md deleted file mode 100644 index 074e828b..00000000 --- a/README.md +++ /dev/null @@ -1,210 +0,0 @@ -# BMA.EHR - HRMS API Backend - -ระบบบริหารจัดการทรัพยากรบุคคล (Human Resource Management System) พัฒนาด้วยสถาปัตยกรรม Microservices บน .NET - ---- - -## Tech Stack - -| Category | Technology | -| ----------------- | ----------------------------- | -| Framework | .NET 6.0 / 7.0 / 8.0 | -| Architecture | Clean Architecture, DDD, CQRS | -| Database | MySQL (Entity Framework Core) | -| Authentication | JWT + Keycloak | -| Message Queue | RabbitMQ | -| Object Storage | MinIO | -| Background Jobs | Hangfire | -| Logging | Serilog + Elasticsearch | -| Error Tracking | Sentry | -| API Documentation | Swagger / OpenAPI | -| Containerization | Docker | -| Testing | xUnit, k6 (Load Testing) | - ---- - -## โครงสร้างโปรเจกต์ (Project Structure) - -``` -BMA.EHR.Solution.sln -├── src/ # Core Libraries -│ ├── BMA.EHR.Domain/ # Domain layer (Entities, Business Rules) -│ ├── BMA.EHR.Application/ # Application layer (Use Cases, Interfaces) -│ └── BMA.EHR.Infrastructure/ # Infrastructure layer (Data Access, External Services) -│ -└── Service/ # Microservices - ├── BMA.EHR.Command.Service/ # Command/CQRS API Gateway - ├── BMA.EHR.MetaData.Service/ # ข้อมูลอ้างอิง (คำนำหน้า, หมู่เลือด, ศาสนา ฯลฯ) - ├── BMA.EHR.Placement.Service/ # การบริจาค/สั่งย้าย/แต่งตั้ง - ├── BMA.EHR.OrganizationEmployee.Service/ # โครงสร้างองค์กรและบุคลากร - ├── BMA.EHR.Discipline.Service/ # การ discipline บุคลากร - ├── BMA.EHR.Retirement.Service/ # การเกษียณอายุราชการ - ├── BMA.EHR.Report.Service/ # รายงาน - ├── BMA.EHR.Insignia/ # เครื่องราชอิสริยาภรณ์ - ├── BMA.EHR.Leave/ # ระบบลา - └── BMA.EHR.CheckInConsumer/ # ลงเวลาปฏิบัติงาน -``` - ---- - -## โมดูลหลัก (Key Modules) - -### การบริหารทรัพยากรบุคคล - -- **Placement Service** - สั่งย้าย, แต่งตั้ง, เลื่อนตำแหน่ง, โอนย้ายบุคลากร -- **Organization Employee Service** - จัดการโครงสร้างองค์กร, ตำแหน่ง, ข้อมูลบุคลากร -- **Leave Service** - การลางาน, การอนุมัติ, วันหยุดนักขัตฤกษ์, ยอดวันลาคงเหลือ -- **Discipline Service** - การดำเนินการ discipline, การสืบสวน, เอกสารที่เกี่ยวข้อง -- **Retirement Service** - การเกษียณอายุ, เอกสาร, สิทธิประโยชน์ -- **Insignia Service** - เครื่องราชอิสริยาภรณ์และรางวัล -- **CheckIn Consumer** - ติดตามการลงเวลาปฏิบัติงาน - -### ระบบสนับสนุน - -- **Metadata Service** - ข้อมูลอ้างอิง (คำนำหน้าชื่อ, หมู่เลือด, ศาสนา, ระดับการศึกษา ฯลฯ) -- **Report Service** - สร้างรายงาน PDF/Excel -- **Command Service** - API Gateway สำหรับ CQRS command operations - -### ฟีเจอร์เด่น - -- **Real-time Notifications** - แจ้งเตือนผ่าน WebSocket -- **Background Processing** - งานที่กำหนดเวลาผ่าน Hangfire -- **Event-Driven Communication** - สื่อสารระหว่าง services ผ่าน RabbitMQ -- **Document Generation** - สร้างเอกสาร PDF/Excel -- **Audit Trail** - บันทึกประวัติการเปลี่ยนแปลงข้อมูลทั้งหมด - ---- - -## API Endpoints - -API ใช้ versioning และสามารถดูรายละเอียดได้ผ่าน Swagger UI: - -``` -/api/v1/placement # การบริจาค/สั่งย้าย/แต่งตั้ง -/api/v1/leave # ระบบลา -/api/v1/discipline # การ discipline -/api/v1/organization # โครงสร้างองค์กร -/api/v1/metadata # ข้อมูลอ้างอิง -/api/v1/retirement # การเกษียณอายุ -/api/v1/insignia # เครื่องราชอิสริยาภรณ์ -/api/v1/reports # รายงาน -``` - ---- - -## Getting Started - -### Prerequisites - -- .NET SDK 6.0 / 7.0 / 8.0 -- MySQL Server -- Keycloak (Authentication Server) -- RabbitMQ -- MinIO (Object Storage) -- Docker (สำหรับ deployment) - -### Configuration - -แต่ละ service มีไฟล์ `appsettings.json` สำหรับ config ดังนี้: - -- **JWT Authentication** - เชื่อมต่อกับ Keycloak -- **Database Connection** - MySQL connection string -- **RabbitMQ** - Message queue connection -- **MinIO** - File storage endpoint -- **Elasticsearch** - Logging endpoint -- **Mail Server** - สำหรับส่งอีเมล - -### Build & Run - -```bash -# Restore dependencies -dotnet restore - -# Build solution -dotnet build - -# Run specific service -dotnet run --project Service/BMA.EHR.Command.Service -``` - -### Docker - -```bash -# Build Docker image -docker build -t bma-ehr-service . - -# Run container -docker run -d -p 5000:80 bma-ehr-service -``` - ---- - -## Architecture - -``` -┌──────────────┐ ┌──────────────┐ ┌──────────────┐ -│ Swagger │ │ Client │ │ WebSocket │ -│ UI │ │ Apps │ │ Clients │ -└──────┬───────┘ └──────┬───────┘ └──────┬───────┘ - │ │ │ - └────────────────────┼────────────────────┘ - │ - ┌────────▼────────┐ - │ API Gateway │ - │ (Keycloak JWT) │ - └────────┬────────┘ - │ - ┌────────────────────┼────────────────────┐ - │ │ │ -┌──────▼──────┐ ┌────────▼──────┐ ┌────────▼──────┐ -│ Placement │ │ Leave │ │ Discipline │ -│ Service │ │ Service │ │ Service │ -└──────┬──────┘ └────────┬──────┘ └────────┬──────┘ - │ │ │ - └────────────────────┼────────────────────┘ - │ - ┌─────────────▼──────────────┐ - │ MySQL Database │ - │ (Entity Framework) │ - └────────────────────────────┘ - - ┌────────────────────────────┐ - │ RabbitMQ / MinIO / │ - │ Elasticsearch / Hangfire │ - └────────────────────────────┘ -``` - ---- - -## Dependencies ที่สำคัญ - -| Package | หน้าที่ | -| --------------------- | ------------------------- | -| Entity Framework Core | ORM สำหรับ MySQL | -| Serilog | Structured Logging | -| Swashbuckle | API Documentation | -| Hangfire | Background Job Processing | -| EPPlus | สร้าง/อ่านไฟล์ Excel | -| iTextSharp | สร้างไฟล์ PDF | -| RabbitMQ.Client | Message Queue | -| NEST | Elasticsearch Client | -| ThaiBahtText | แปลงตัวเลขเป็นหน่วยบาทไทย | -| NodaTime | Date/Time Handling | -| Sentry | Error Tracking | - ---- - -## Testing - -```bash -# Run unit tests -dotnet test - -# Run with coverage -dotnet test --collect:"XPlat Code Coverage" - -# Run load tests (k6) -k6 run tests/load/*.js -``` - ----