diff --git a/AccountManagement.Application.Contracts/Media/IMediaApplication.cs b/AccountManagement.Application.Contracts/Media/IMediaApplication.cs index a4148a11..b2473b34 100644 --- a/AccountManagement.Application.Contracts/Media/IMediaApplication.cs +++ b/AccountManagement.Application.Contracts/Media/IMediaApplication.cs @@ -7,7 +7,8 @@ namespace AccountManagement.Application.Contracts.Media public interface IMediaApplication { MediaViewModel Get(long id); - OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength, List allowedExtensions); + OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength, + List allowedExtensions, string category); OperationResult MoveFile(long mediaId, string newRelativePath); OperationResult DeleteFile(long mediaId); List GetRange(IEnumerable select); diff --git a/AccountManagement.Application/MediaApplication.cs b/AccountManagement.Application/MediaApplication.cs index a0a37355..80278876 100644 --- a/AccountManagement.Application/MediaApplication.cs +++ b/AccountManagement.Application/MediaApplication.cs @@ -22,54 +22,20 @@ namespace AccountManagement.Application } - /// - /// دریافت فایل و نوشتن آن در مسیر داده شده، و ثبت مدیا - /// - /// فایل - /// برچسب فایل که در نام فایل ظاهر می شود - /// مسیر فایل - /// [.png,.jpg,.jpeg] پسوند های مجاز مثلا - /// حداکثر حجم فایل به مگابایت - /// - public OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath,int maximumFileLength,List allowedExtensions) + /// + /// دریافت فایل و نوشتن آن در مسیر داده شده، و ثبت مدیا + /// + /// فایل + /// برچسب فایل که در نام فایل ظاهر می شود + /// مسیر فایل + /// حداکثر حجم فایل به مگابایت + /// [.png,.jpg,.jpeg] پسوند های مجاز مثلا + /// + /// + public OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength, + List allowedExtensions, string category) { - OperationResult op = new(); - var path = Path.Combine(_basePath, relativePath); - var fileExtension = Path.GetExtension(file.FileName); - - if (file == null || file.Length == 0) - return op.Failed("خطای سیستمی"); - - if (file.Length > (maximumFileLength * 1024 * 1024)) - return op.Failed($"حجم فایل نمی تواند بیشتر از " + - $"{maximumFileLength}" + - $"مگابایت باشد"); - - if (!allowedExtensions.Contains(fileExtension.ToLower())) - { - var operationMessage = ":فرمت فایل باید یکی از موارد زیر باشد"; - operationMessage += "\n"; - operationMessage += string.Join(" ", allowedExtensions); - return op.Failed(operationMessage); - } - - - Directory.CreateDirectory(path); - - var extension = Path.GetExtension(file.FileName); - - var uniqueFileName = $"{fileLabel}-{DateTime.Now.Ticks}{extension}"; - var filePath = Path.Combine(path, uniqueFileName); - using (var fileStream = new FileStream(filePath, FileMode.CreateNew)) - { - file.CopyTo(fileStream); - } - var mediaEntity = new Media(filePath, extension, "فایل", "EmployeeDocuments"); - _mediaRepository.Create(mediaEntity); - _mediaRepository.SaveChanges(); - - return op.Succcedded(mediaEntity.id); - + return _mediaRepository.UploadFile(file,fileLabel, relativePath, maximumFileLength, allowedExtensions, category); } diff --git a/AccountManagement.Domain/MediaAgg/IMediaRepository.cs b/AccountManagement.Domain/MediaAgg/IMediaRepository.cs index b8ccb898..1b71139d 100644 --- a/AccountManagement.Domain/MediaAgg/IMediaRepository.cs +++ b/AccountManagement.Domain/MediaAgg/IMediaRepository.cs @@ -1,12 +1,15 @@ using System.Collections.Generic; +using _0_Framework.Application; using _0_Framework.Domain; using AccountManagement.Application.Contracts.Media; +using Microsoft.AspNetCore.Http; namespace AccountManagement.Domain.MediaAgg; public interface IMediaRepository:IRepository { + public string BasePath { get; protected set; } void CreateMediaWithTaskMedia(long taskId, long mediaId); List GetMediaByTaskId(long taskId); void Remove(long id); @@ -23,4 +26,6 @@ public interface IMediaRepository:IRepository #endregion + OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength, + List allowedExtensions, string category); } \ No newline at end of file diff --git a/AccountMangement.Infrastructure.EFCore/Repository/MediaRepository.cs b/AccountMangement.Infrastructure.EFCore/Repository/MediaRepository.cs index 541ce3f1..7c8588c4 100644 --- a/AccountMangement.Infrastructure.EFCore/Repository/MediaRepository.cs +++ b/AccountMangement.Infrastructure.EFCore/Repository/MediaRepository.cs @@ -1,5 +1,8 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.IO; using System.Linq; +using _0_Framework.Application; using _0_Framework.InfraStructure; using AccountManagement.Application.Contracts.Media; using AccountManagement.Domain.AdminResponseMediaAgg; @@ -7,19 +10,27 @@ using AccountManagement.Domain.ClientResponseMediaAgg; using AccountManagement.Domain.MediaAgg; using AccountManagement.Domain.TaskMediaAgg; using AccountManagement.Domain.TicketMediasAgg; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; namespace AccountMangement.Infrastructure.EFCore.Repository; public class MediaRepository:RepositoryBase,IMediaRepository { + private const string _basePath = "Storage/Medias"; + public string BasePath { get; set; } + + private readonly AccountContext _accountContext; - public MediaRepository( AccountContext taskManagerContext) : base(taskManagerContext) + public MediaRepository( AccountContext taskManagerContext, IWebHostEnvironment webHostEnvironment) : base(taskManagerContext) { _accountContext = taskManagerContext; + BasePath = webHostEnvironment.ContentRootPath+"/Storage"; } //ساخت جدول واسط بین مدیا و نسک //نکته: این متد ذخیره انجام نمیدهد + public void CreateMediaWithTaskMedia(long taskId, long mediaId) { var Taskmedias = new TaskMedia(taskId,mediaId); @@ -77,6 +88,48 @@ public class MediaRepository:RepositoryBase,IMediaRepository { return _accountContext.Medias.Where(x => mediaIds.Contains(x.id)).ToList(); } + + public OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength, + List allowedExtensions, string category) + { + OperationResult op = new(); + var path = Path.Combine(_basePath, relativePath); + var fileExtension = Path.GetExtension(file.FileName); + + if (file == null || file.Length == 0) + return op.Failed("خطای سیستمی"); + + if (file.Length > (maximumFileLength * 1024 * 1024)) + return op.Failed($"حجم فایل نمی تواند بیشتر از " + + $"{maximumFileLength}" + + $"مگابایت باشد"); + + if (!allowedExtensions.Contains(fileExtension.ToLower())) + { + var operationMessage = ":فرمت فایل باید یکی از موارد زیر باشد"; + operationMessage += "\n"; + operationMessage += string.Join(" ", allowedExtensions); + return op.Failed(operationMessage); + } + + + Directory.CreateDirectory(path); + + var extension = Path.GetExtension(file.FileName); + + var uniqueFileName = $"{fileLabel}-{DateTime.Now.Ticks}{extension}"; + var filePath = Path.Combine(path, uniqueFileName); + using (var fileStream = new FileStream(filePath, FileMode.CreateNew)) + { + file.CopyTo(fileStream); + } + var mediaEntity = new Media(filePath, extension, "فایل", category); + Create(mediaEntity); + SaveChanges(); + + return op.Succcedded(mediaEntity.id); + + } } #endregion diff --git a/Company.Domain/InsuranceListAgg/InsuranceList.cs b/Company.Domain/InsuranceListAgg/InsuranceList.cs index 9717b967..ade683ed 100644 --- a/Company.Domain/InsuranceListAgg/InsuranceList.cs +++ b/Company.Domain/InsuranceListAgg/InsuranceList.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using _0_Framework.Domain; +using Company.Domain.InsuranceListAgg.ValueObjects; using Company.Domain.InsuranceWorkshopAgg; namespace Company.Domain.InsuranceListAgg; @@ -166,7 +167,6 @@ public class InsuranceList : EntityBase public InsuranceListEmployerApproval EmployerApproval { get; set; } = new(InsuranceListEmployerApprovalStatus.None, string.Empty); #endregion - public List InsuranceListWorkshops { get; set; } public void Edit(int sumOfEmployees, int sumOfWorkingDays, double sumOfSalaries, double sumOfBenefitsIncluded, double included, @@ -190,73 +190,22 @@ public class InsuranceList : EntityBase SumOfDailyWagePlusBaseYears = sumOfDailyWage + sumOfBaseYears; } -} -public class InsuranceListEmployerApproval -{ - public InsuranceListEmployerApproval(InsuranceListEmployerApprovalStatus status, string description) + public void SetDebt(InsuranceListDebt debt) { - Status = status; - Description = description; + Debt = debt; + } + public void SetInspection(InsuranceListInspection inspection) + { + Inspection = inspection; + } + public void SetEmployerApproval(InsuranceListEmployerApproval employerApproval) + { + EmployerApproval = employerApproval; + } + public void SetConfirmSentlist(bool confirmSentlist) + { + ConfirmSentlist = confirmSentlist; } - public InsuranceListEmployerApprovalStatus Status { get; set; } - public string Description { get; set; } } - -public enum InsuranceListEmployerApprovalStatus -{ - None, - /// - /// تاییدیه شفاهی (اذنی) - /// - VerbalApproval, - /// - /// تاییدیه کاغذی - /// - WrittenApproval -} - -public class InsuranceListDebt -{ - public InsuranceListDebt(InsuranceListDebtType type, DateTime debtDate, double amount, long mediaId) - { - Type = type; - DebtDate = debtDate; - Amount = amount; - MediaId = mediaId; - } - - public InsuranceListDebtType Type { get; set; } - public DateTime DebtDate { get; set; } - public double Amount { get; set; } - public long MediaId { get; set; } -} - -public enum InsuranceListDebtType -{ - None, - Old, - New -} - -public class InsuranceListInspection -{ - public InsuranceListInspection(InsuraceListInspectionType type, DateTime lastInspectionDateTime, long mediaId) - { - Type = type; - LastInspectionDateTime = lastInspectionDateTime; - MediaId = mediaId; - } - - public InsuraceListInspectionType Type { get; set; } - public DateTime LastInspectionDateTime { get; set; } - public long MediaId { get; set; } -} - -public enum InsuraceListInspectionType -{ - None, - Old, - New -} \ No newline at end of file diff --git a/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListDebt.cs b/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListDebt.cs new file mode 100644 index 00000000..8190e47d --- /dev/null +++ b/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListDebt.cs @@ -0,0 +1,28 @@ +using System; + +namespace Company.Domain.InsuranceListAgg.ValueObjects; + +public class InsuranceListDebt +{ + public InsuranceListDebt(InsuranceListDebtType type, DateTime debtDate, double amount, long mediaId) + { + Type = type; + if (type == InsuranceListDebtType.None) + { + DebtDate = DateTime.MinValue; + Amount = 0; + MediaId = 0; + } + else + { + DebtDate = debtDate; + Amount = amount; + MediaId = mediaId; + } + } + + public InsuranceListDebtType Type { get; set; } + public DateTime DebtDate { get; set; } + public double Amount { get; set; } + public long MediaId { get; set; } +} \ No newline at end of file diff --git a/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListEmployerApproval.cs b/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListEmployerApproval.cs new file mode 100644 index 00000000..b514e022 --- /dev/null +++ b/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListEmployerApproval.cs @@ -0,0 +1,13 @@ +namespace Company.Domain.InsuranceListAgg.ValueObjects; + +public class InsuranceListEmployerApproval +{ + public InsuranceListEmployerApproval(InsuranceListEmployerApprovalStatus status, string description) + { + Status = status; + Description = status == InsuranceListEmployerApprovalStatus.None ? string.Empty : description; + } + + public InsuranceListEmployerApprovalStatus Status { get; set; } + public string Description { get; set; } +} \ No newline at end of file diff --git a/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListInspection.cs b/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListInspection.cs new file mode 100644 index 00000000..89df8081 --- /dev/null +++ b/Company.Domain/InsuranceListAgg/ValueObjects/InsuranceListInspection.cs @@ -0,0 +1,25 @@ +using System; + +namespace Company.Domain.InsuranceListAgg.ValueObjects; + +public class InsuranceListInspection +{ + public InsuranceListInspection(InsuraceListInspectionType type, DateTime lastInspectionDateTime, long mediaId) + { + Type = type; + if (type == InsuraceListInspectionType.None) + { + LastInspectionDateTime = DateTime.MinValue; + MediaId = 0; + } + else + { + LastInspectionDateTime = lastInspectionDateTime; + MediaId = mediaId; + } + } + + public InsuraceListInspectionType Type { get; set; } + public DateTime LastInspectionDateTime { get; set; } + public long MediaId { get; set; } +} \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuraceListInspectionType.cs b/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuraceListInspectionType.cs new file mode 100644 index 00000000..2e0f6d2c --- /dev/null +++ b/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuraceListInspectionType.cs @@ -0,0 +1,8 @@ +namespace Company.Domain.InsuranceListAgg.ValueObjects; + +public enum InsuraceListInspectionType +{ + None, + Old, + New +} \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuranceListDebtType.cs b/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuranceListDebtType.cs new file mode 100644 index 00000000..94cd6b34 --- /dev/null +++ b/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuranceListDebtType.cs @@ -0,0 +1,8 @@ +namespace Company.Domain.InsuranceListAgg.ValueObjects; + +public enum InsuranceListDebtType +{ + None, + Old, + New +} \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuranceListEmployerApprovalStatus.cs b/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuranceListEmployerApprovalStatus.cs new file mode 100644 index 00000000..9719cbab --- /dev/null +++ b/CompanyManagment.App.Contracts/InsuranceList/Enums/InsuranceListEmployerApprovalStatus.cs @@ -0,0 +1,14 @@ +namespace Company.Domain.InsuranceListAgg.ValueObjects; + +public enum InsuranceListEmployerApprovalStatus +{ + None, + /// + /// تاییدیه شفاهی (اذنی) + /// + VerbalApproval, + /// + /// تاییدیه کاغذی + /// + WrittenApproval +} \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/InsuranceList/IInsuranceListApplication.cs b/CompanyManagment.App.Contracts/InsuranceList/IInsuranceListApplication.cs index 16b954d3..0098ab7c 100644 --- a/CompanyManagment.App.Contracts/InsuranceList/IInsuranceListApplication.cs +++ b/CompanyManagment.App.Contracts/InsuranceList/IInsuranceListApplication.cs @@ -4,7 +4,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using _0_Framework.Application; +using Company.Domain.InsuranceListAgg.ValueObjects; using CompanyManagment.App.Contracts.InsuranceList; +using Microsoft.AspNetCore.Http; namespace CompanyManagment.App.Contracts.InsuranceList; @@ -34,4 +36,14 @@ public interface IInsuranceListApplication //farokhiChanges (double basic, int totalYear) BasicYear(long employeeId, long worshopId, DateTime startDate); double GetMonthlyBaseYear(double dayliBase, int countWorkingDays); -} \ No newline at end of file + + #region Mahan + /// + /// مراحل اجرایی برای تکمیل و ارسال لیست بیمه + /// + /// + Task ConfirmInsuranceOperation(InsuranceListConfirmOperation command); + + #endregion +} + diff --git a/CompanyManagment.App.Contracts/InsuranceList/InsuranceListConfirmOperation.cs b/CompanyManagment.App.Contracts/InsuranceList/InsuranceListConfirmOperation.cs new file mode 100644 index 00000000..abd1c013 --- /dev/null +++ b/CompanyManagment.App.Contracts/InsuranceList/InsuranceListConfirmOperation.cs @@ -0,0 +1,33 @@ +using Company.Domain.InsuranceListAgg.ValueObjects; +using Microsoft.AspNetCore.Http; + +namespace CompanyManagment.App.Contracts.InsuranceList; + +public class InsuranceListConfirmOperation +{ + public long InsuranceListId { get; set; } + public CreateInsuranceListInspection Inspection { get; set; } + public CreateInsuranceListDebt Debt { get; set; } + public CreateInsuranceListApproval Approval { get; set; } + public bool ConfirmSentList { get; set; } +} +public class CreateInsuranceListApproval +{ + public InsuranceListEmployerApprovalStatus ApprovalStatus { get; set; } + public string Description { get; set; } +} + +public class CreateInsuranceListDebt +{ + public InsuranceListDebtType Type { get; set; } + public string DebtDate { get; set; } + public string Amount { get; set; } + public IFormFile DebtFile { get; set; } +} + +public class CreateInsuranceListInspection +{ + public InsuraceListInspectionType Type { get; set; } + public string LastInspectionDate { get; set; } + public IFormFile InspectionFile { get; set; } +} \ No newline at end of file diff --git a/CompanyManagment.Application/BankApplication.cs b/CompanyManagment.Application/BankApplication.cs index 7dabda37..d4c0a44d 100644 --- a/CompanyManagment.Application/BankApplication.cs +++ b/CompanyManagment.Application/BankApplication.cs @@ -55,7 +55,7 @@ namespace CompanyManagment.Application if(command.BankLogoPictureFile != null && command.BankLogoPictureFile.Length >0 ) { var uploadResult = _mediaApplication.UploadFile(command.BankLogoPictureFile, command.BankName, - _basePath, 10, [".jpg", ".jpeg", ".png",".svg"]); + _basePath, 10, [".jpg", ".jpeg", ".png",".svg"], "Bank"); if (uploadResult.IsSuccedded == false) return uploadResult; mediaId = uploadResult.SendId; @@ -81,7 +81,7 @@ namespace CompanyManagment.Application if (command.BankLogoPictureFile != null && command.BankLogoPictureFile.Length > 0) { var uploadResult = _mediaApplication.UploadFile(command.BankLogoPictureFile, command.BankName, - _basePath, 10, [".jpg", ".jpeg", ".png",".svg"]); + _basePath, 10, [".jpg", ".jpeg", ".png",".svg"], "Bank"); if (uploadResult.IsSuccedded == false) return uploadResult; _mediaApplication.DeleteFile(entity.BankLogoMediaId); diff --git a/CompanyManagment.Application/InsuranceListApplication.cs b/CompanyManagment.Application/InsuranceListApplication.cs index 95d3f118..e3b9a51e 100644 --- a/CompanyManagment.Application/InsuranceListApplication.cs +++ b/CompanyManagment.Application/InsuranceListApplication.cs @@ -1,10 +1,13 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using _0_Framework.Application; using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects; +using AccountManagement.Domain.MediaAgg; using Company.Domain.CheckoutAgg; using Company.Domain.DateSalaryAgg; using Company.Domain.DateSalaryItemAgg; @@ -15,6 +18,7 @@ using Company.Domain.empolyerAgg; using Company.Domain.InsuranceEmployeeInfoAgg; using Company.Domain.InsuranceJobItemAgg; using Company.Domain.InsuranceListAgg; +using Company.Domain.InsuranceListAgg.ValueObjects; using Company.Domain.InsurancWorkshopInfoAgg; using Company.Domain.LeftWorkAgg; using Company.Domain.LeftWorkInsuranceAgg; @@ -32,10 +36,12 @@ using CompanyManagment.App.Contracts.YearlySalary; using CompanyManagment.App.Contracts.YearlySalaryItems; using CompanyManagment.EFCore.Migrations; using MD.PersianDateTime.Standard; +using Microsoft.AspNetCore.Authorization.Infrastructure; +using Microsoft.AspNetCore.Http; namespace CompanyManagment.Application; -public class InsuranceListApplication: IInsuranceListApplication +public class InsuranceListApplication : IInsuranceListApplication { //private readonly ITransactionManager _transactionManager; @@ -57,11 +63,11 @@ public class InsuranceListApplication: IInsuranceListApplication private readonly ILeftWorkInsuranceRepository _leftWorkInsuranceRepository; private readonly IInsuranceYearlySalaryApplication _insuranceYearlySalaryApplication; private readonly ICheckoutRepository _checkoutRepository; - - public InsuranceListApplication( IInsuranceListRepository insuranceListRepositpry, IEmployeeInsurancListDataRepository employeeInsurancListDataRepository, IInsuranceEmployeeInfoRepository insuranceEmployeeInfoRepository, IEmployeeRepository employeeRepository, IWorkshopRepository workShopRepository, ILeftWorkInsuranceApplication leftWorkInsuranceApplication, IInsuranceEmployeeInfoApplication insuranceEmployeeInfoApplication, IEmployeeInsurancListDataApplication employeeInsurancListDataApplication, IYearlySalaryApplication yearlySalaryApplication,IYearlySalaryItemApplication yearlySalaryItemApplication ,IInsuranceWorkshopInfoRepository insuranceWorkshopInfoRepository,IInsuranceJobItemRepositpry insuranceJobItemRepository, IDateSalaryRepository dateSalaryRepository, IDateSalaryItemRepository dateSalaryItemRepository, IPersonalContractingPartyApp contractingPartyApp, ILeftWorkInsuranceRepository leftWorkInsuranceRepository, IInsuranceYearlySalaryApplication insuranceYearlySalaryApplication, ICheckoutRepository checkoutRepository) + private readonly IMediaRepository _mediaRepository; + public InsuranceListApplication(IInsuranceListRepository insuranceListRepositpry, IEmployeeInsurancListDataRepository employeeInsurancListDataRepository, IInsuranceEmployeeInfoRepository insuranceEmployeeInfoRepository, IEmployeeRepository employeeRepository, IWorkshopRepository workShopRepository, ILeftWorkInsuranceApplication leftWorkInsuranceApplication, IInsuranceEmployeeInfoApplication insuranceEmployeeInfoApplication, IEmployeeInsurancListDataApplication employeeInsurancListDataApplication, IYearlySalaryApplication yearlySalaryApplication, IYearlySalaryItemApplication yearlySalaryItemApplication, IInsuranceWorkshopInfoRepository insuranceWorkshopInfoRepository, IInsuranceJobItemRepositpry insuranceJobItemRepository, IDateSalaryRepository dateSalaryRepository, IDateSalaryItemRepository dateSalaryItemRepository, IPersonalContractingPartyApp contractingPartyApp, ILeftWorkInsuranceRepository leftWorkInsuranceRepository, IInsuranceYearlySalaryApplication insuranceYearlySalaryApplication, ICheckoutRepository checkoutRepository, IMediaRepository mediaRepository) { // _transactionManager = transactionManager; - + _insuranceListRepositpry = insuranceListRepositpry; _employeeInsurancListDataRepository = employeeInsurancListDataRepository; _insuranceEmployeeInfoRepository = insuranceEmployeeInfoRepository; @@ -80,21 +86,22 @@ public class InsuranceListApplication: IInsuranceListApplication _leftWorkInsuranceRepository = leftWorkInsuranceRepository; _insuranceYearlySalaryApplication = insuranceYearlySalaryApplication; _checkoutRepository = checkoutRepository; + _mediaRepository = mediaRepository; } public OperationResult Create(CreateInsuranceList command) { - + var operation = new OperationResult(); - if (command.WorkshopId==0 ) + if (command.WorkshopId == 0) { return operation.Failed(" انتخاب کارگاه اجباری می باشد "); } - if ( command.Month == "0" ) + if (command.Month == "0") { return operation.Failed(" انتخاب ماه اجباری می باشد "); } - if ( command.Year == "0") + if (command.Year == "0") { return operation.Failed("انتخاب سال اجباری می باشد "); } @@ -171,7 +178,7 @@ public class InsuranceListApplication: IInsuranceListApplication public OperationResult Edit(EditInsuranceList command) { - + var operation = new OperationResult(); if (command.WorkshopId == 0) { @@ -185,7 +192,7 @@ public class InsuranceListApplication: IInsuranceListApplication { return operation.Failed("انتخاب سال اجباری می باشد "); } - else if (_insuranceListRepositpry.Exists(x =>x.id!=command.Id && x.WorkshopId == command.WorkshopId && x.Month == command.Month && x.Year == command.Year)) + else if (_insuranceListRepositpry.Exists(x => x.id != command.Id && x.WorkshopId == command.WorkshopId && x.Month == command.Month && x.Year == command.Year)) { return operation.Failed(" لیست بیمه برای کارگاه، سال و ماه انتخاب شده قبلا ایجاد شده است "); } @@ -211,7 +218,7 @@ public class InsuranceListApplication: IInsuranceListApplication createInsuranceEmployeeInfo.Gender = item.Gender; createInsuranceEmployeeInfo.InsuranceCode = item.InsuranceCode; createInsuranceEmployeeInfo.DateOfBirthGr = item.DateOfBirth.ToGeorgianDateTime(); - createInsuranceEmployeeInfo.DateOfIssueGr =!string.IsNullOrEmpty(item.DateOfIssue)? item.DateOfIssue.ToGeorgianDateTime(): "1300/10/11".ToGeorgianDateTime(); + createInsuranceEmployeeInfo.DateOfIssueGr = !string.IsNullOrEmpty(item.DateOfIssue) ? item.DateOfIssue.ToGeorgianDateTime() : "1300/10/11".ToGeorgianDateTime(); _insuranceEmployeeInfoApplication.Create(createInsuranceEmployeeInfo); } else @@ -266,8 +273,8 @@ public class InsuranceListApplication: IInsuranceListApplication return operation; } - - } + + } public EditInsuranceList GetDetails(long id) { @@ -302,8 +309,8 @@ public class InsuranceListApplication: IInsuranceListApplication foreach (var item in insuranceListDetails.EmployeeDetailsForInsuranceList) { - - item.IncludeStatus = _leftWorkInsuranceApplication.GetLeftPersonelByWorkshopIdAndEmployeeId(insuranceListDetails.WorkshopId,item.EmployeeId).IncludeStatus; + + item.IncludeStatus = _leftWorkInsuranceApplication.GetLeftPersonelByWorkshopIdAndEmployeeId(insuranceListDetails.WorkshopId, item.EmployeeId).IncludeStatus; if (!string.IsNullOrEmpty(item.LeftWorkDate)) { var yearEndDateUser = Convert.ToInt32(item.LeftWorkDate.Substring(0, 4)); @@ -348,7 +355,7 @@ public class InsuranceListApplication: IInsuranceListApplication return insuranceListDetails; } - public List Search(InsuranceListSearchModel searchModel) + public List Search(InsuranceListSearchModel searchModel) { return _insuranceListRepositpry.OptimizedSearch(searchModel); //var result = _insuranceListRepositpry.Search(searchModel); @@ -380,10 +387,10 @@ public class InsuranceListApplication: IInsuranceListApplication /// /// /// - public MainEmployeeDetailsViewModel SearchEmployeeForCreateInsuranceList( EmployeeForCreateInsuranceListSearchModel searchModel) + public MainEmployeeDetailsViewModel SearchEmployeeForCreateInsuranceList(EmployeeForCreateInsuranceListSearchModel searchModel) { - var watch = new Stopwatch(); - + var watch = new Stopwatch(); + var result = new MainEmployeeDetailsViewModel(); var workshopId = searchModel.WorkshopIds.FirstOrDefault(); var workshop = _workShopRepository.GetDetails(workshopId); @@ -392,30 +399,30 @@ public class InsuranceListApplication: IInsuranceListApplication double monthlybaseYear = 0; // اگر در این سال و ماه برای این کارگاه لیست بیمه ایجاد نشده بود if (!_insuranceListRepositpry.Exists(x => - x.Year == searchModel.Year && x.Month == searchModel.Month && - searchModel.WorkshopIds.Contains(x.WorkshopId))) + x.Year == searchModel.Year && x.Month == searchModel.Month && + searchModel.WorkshopIds.Contains(x.WorkshopId))) { var startMonthFa = $"{searchModel.Year}/{searchModel.Month.PadLeft(2, '0')}/01"; DateTime startDateGr = startMonthFa.ToGeorgianDateTime(); - DateTime endDateGr = startMonthFa.FindeEndOfMonth() - .ToGeorgianDateTime(); + DateTime endDateGr = startMonthFa.FindeEndOfMonth() + .ToGeorgianDateTime(); int endOfMonth = Convert.ToInt32((startMonthFa.FindeEndOfMonth()).Substring(8, 2)); - - //مقادیر سالانه این تاریخ - var yearlysaleries = _yearlySalaryApplication.GetInsuranceItems(startDateGr, endDateGr, searchModel.Year); + + //مقادیر سالانه این تاریخ + var yearlysaleries = _yearlySalaryApplication.GetInsuranceItems(startDateGr, endDateGr, searchModel.Year); - // دریافت اطلاعات هویتی و شروع و ترک کار کارکنان - var employeesInfoAndLeftWorks = - _leftWorkInsuranceApplication.GetEmployeeInsuranceLeftWorksAndInformation(workshopId, startDateGr, - endDateGr); + // دریافت اطلاعات هویتی و شروع و ترک کار کارکنان + var employeesInfoAndLeftWorks = + _leftWorkInsuranceApplication.GetEmployeeInsuranceLeftWorksAndInformation(workshopId, startDateGr, + endDateGr); var employeeInsurancDataPreviusList = _insuranceListRepositpry.GetEmployeeInsuranceDataAmonthAgo(startDateGr, workshopId); - watch.Start(); - var computeResult = employeesInfoAndLeftWorks.Select(employee => + watch.Start(); + var computeResult = employeesInfoAndLeftWorks.Select(employee => { var dateOfBirth = employee.DateOfBirthGr.ToFarsi(); var dateOfIssue = employee.DateOfIssueGr.ToFarsi(); @@ -426,7 +433,7 @@ public class InsuranceListApplication: IInsuranceListApplication //آیا در کارگاه تیک محاسبه اضافه کار یا حق اولاد زده شده است؟ bool hasWorkshopOverTimeOrFamilyAllowance = workshop.InsuranceCheckoutFamilyAllowance || workshop.InsuranceCheckoutOvertime; - + //آیا پرسنل فیش حقوق دارد //این مورد زمانی چک می شود که تیک محاسبه در کارگاه زده شده باشد // در غیر اینصورت بصورت پیشفرض دارای فیش حقوق در نظر گرفته می شود @@ -439,10 +446,10 @@ public class InsuranceListApplication: IInsuranceListApplication searchModel.Year, searchModel.Month); if (checkout.hasChekout) { - + familyAllowance = checkout.FamilyAlloance; overTimePay = checkout.OverTimePay; - + } else { @@ -451,9 +458,9 @@ public class InsuranceListApplication: IInsuranceListApplication } - - var workingDays = Tools.GetEmployeeInsuranceWorkingDays(employee.StartWorkDateGr, leftDate, startDateGr,endDateGr, employee.EmployeeId); - var leftWorkFa = workingDays.hasLeftWorkInMonth ? employee.LeftWorkDateGr.ToFarsi(): ""; + + var workingDays = Tools.GetEmployeeInsuranceWorkingDays(employee.StartWorkDateGr, leftDate, startDateGr, endDateGr, employee.EmployeeId); + var leftWorkFa = workingDays.hasLeftWorkInMonth ? employee.LeftWorkDateGr.ToFarsi() : ""; var startWorkFa = employee.StartWorkDateGr.ToFarsi(); //به دست آوردن دستمزد روزانه با توجه به اینکه کارگاه مشاغل مقطوع است یا خیر @@ -463,34 +470,34 @@ public class InsuranceListApplication: IInsuranceListApplication var res = GetDailyWageFixedSalary(searchModel.Year, workshopId, employee.EmployeeId, startDateGr, endDateGr, employee.JobId, searchModel.Population, searchModel.InsuranceJobId); dailyWage = res ?? 0; - + } else { var res = ComputeDailyWage(yearlysaleries.DayliWage, employee.EmployeeId, workshopId, searchModel.Year); dailyWage = res; } - - + + //بدست آوردن پایه سنوات var baseYears = _insuranceListRepositpry.GetEmployeeInsuranceBaseYear(employee.EmployeeId, workshopId, - workingDays.countWorkingDays, startDateGr, endDateGr,workingDays.startWork, workingDays.endWork, workingDays.hasLeftWorkInMonth); + workingDays.countWorkingDays, startDateGr, endDateGr, workingDays.startWork, workingDays.endWork, workingDays.hasLeftWorkInMonth); //آیا کارفرما یا مدیر عامل است؟ - - baseYears.baseYear = isManager ? 0 : baseYears.baseYear; - Console.WriteLine(employee.JobId + " - "+ baseYears.baseYear); - //جمع مزد روزانه و پایه سنوات - var dailyWagePlusBaseYears = dailyWage + baseYears.baseYear; - - //دستمزد ماهانه با محاسبه پایه سنوات + baseYears.baseYear = isManager ? 0 : baseYears.baseYear; + Console.WriteLine(employee.JobId + " - " + baseYears.baseYear); + //جمع مزد روزانه و پایه سنوات + var dailyWagePlusBaseYears = dailyWage + baseYears.baseYear; + + + //دستمزد ماهانه با محاسبه پایه سنوات var monthlySalary = GetRoundValue(dailyWagePlusBaseYears * workingDays.countWorkingDays); //حق تاهل var marriedAllowance = employee.MaritalStatus == "متاهل" && !isManager ? yearlysaleries.MarriedAllowance : 0; //محاسبه مزایای ماهانه - var monthlyBenefits = GetMonthlyBenefits(endOfMonth, yearlysaleries.ConsumableItems, yearlysaleries.HousingAllowance, marriedAllowance, workingDays.countWorkingDays, searchModel.TypeOfInsuranceSendWorkshop, employee.JobId, employee.EmployeeId,employee.IncludeStatus); + var monthlyBenefits = GetMonthlyBenefits(endOfMonth, yearlysaleries.ConsumableItems, yearlysaleries.HousingAllowance, marriedAllowance, workingDays.countWorkingDays, searchModel.TypeOfInsuranceSendWorkshop, employee.JobId, employee.EmployeeId, employee.IncludeStatus); //if (employee.EmployeeId is 7999)// سید عباس خوشکلام سلیمان // monthlyBenefits = 80869389; @@ -501,7 +508,7 @@ public class InsuranceListApplication: IInsuranceListApplication monthlyBenefits = GetRoundValue(monthlyBenefits += overTimePay); } - + //سرای ملک // نوشین خالی // 39692467 @@ -509,13 +516,13 @@ public class InsuranceListApplication: IInsuranceListApplication // monthlyBenefits += 39692467; var marriedAllowanceCompute = MarriedAllowance(employee.MaritalStatus, employee.JobId, employee.IncludeStatus, - workingDays.countWorkingDays, yearlysaleries.MarriedAllowance, endOfMonth); - //محاسبه جمع مزایای مشمول و دستمزد ماهانه - var benefitsIncludedContinuous = monthlyBenefits + monthlySalary; + workingDays.countWorkingDays, yearlysaleries.MarriedAllowance, endOfMonth); + //محاسبه جمع مزایای مشمول و دستمزد ماهانه + var benefitsIncludedContinuous = monthlyBenefits + monthlySalary; - //benefitsIncludedContinuous = employee.JobId != 16 ? benefitsIncludedContinuous : 0; - //محاسبه حق بیمه سهم بیمه شده - var insuranceShare = (benefitsIncludedContinuous * 7) / 100; + //benefitsIncludedContinuous = employee.JobId != 16 ? benefitsIncludedContinuous : 0; + //محاسبه حق بیمه سهم بیمه شده + var insuranceShare = (benefitsIncludedContinuous * 7) / 100; //محاسبه حق بیمه سهم کارفرما var employerShare = (benefitsIncludedContinuous * 20) / 100; @@ -535,30 +542,30 @@ public class InsuranceListApplication: IInsuranceListApplication benefitsIncludedNonContinuous = GetRoundValue(benefitsIncludedNonContinuous + familyAllowance); } - - + + var includedAndNotIncluded = benefitsIncludedContinuous + benefitsIncludedNonContinuous; return new EmployeeDetailsForInsuranceListViewModel - { - #region EmployeeInfo + { + #region EmployeeInfo EmployeeHasCheckout = employeeHasCheckout, InsuranceEmployeeInformationId = employee.InsuranceEmployeeInformationId, - EmployeeId = employee.EmployeeId, - FName = employee.FName, - LName = employee.LName, - FatherName = employee.FatherName, - DateOfBirth = dateOfBirth == "1300/10/11" ? "" : dateOfBirth, - DateOfIssue = dateOfIssue, - DateOfBirthGr = employee.DateOfBirthGr, - DateOfIssueGr = employee.DateOfIssueGr, - PlaceOfIssue = employee.PlaceOfIssue, - IdNumber = employee.IdNumber, - Gender = employee.Gender, - NationalCode = employee.NationalCode, - Nationality = employee.Nationality, - InsuranceCode = employee.InsuranceCode, + EmployeeId = employee.EmployeeId, + FName = employee.FName, + LName = employee.LName, + FatherName = employee.FatherName, + DateOfBirth = dateOfBirth == "1300/10/11" ? "" : dateOfBirth, + DateOfIssue = dateOfIssue, + DateOfBirthGr = employee.DateOfBirthGr, + DateOfIssueGr = employee.DateOfIssueGr, + PlaceOfIssue = employee.PlaceOfIssue, + IdNumber = employee.IdNumber, + Gender = employee.Gender, + NationalCode = employee.NationalCode, + Nationality = employee.Nationality, + InsuranceCode = employee.InsuranceCode, // آیا وضعیت تاهل پرسنل ست شده است IsMaritalStatusSet = !string.IsNullOrWhiteSpace(employee.MaritalStatus), MaritalStatus = employee.MaritalStatus, @@ -582,7 +589,7 @@ public class InsuranceListApplication: IInsuranceListApplication IncludeStatus = employee.IncludeStatus, //دستمزد روزانه - DailyWage = GetRoundValue(dailyWage), + DailyWage = GetRoundValue(dailyWage), DailyWageStr = dailyWage.ToMoney(), HasConfilictJobs = dailyWage == 0, @@ -598,13 +605,13 @@ public class InsuranceListApplication: IInsuranceListApplication //دستمزد ماهانه MonthlySalary = monthlySalary, - - + + //مزایای ماهانه MonthlyBenefits = monthlyBenefits, - //جمع مزایای مشمول و دستمزد ماهانه - BenefitsIncludedContinuous = benefitsIncludedContinuous, + //جمع مزایای مشمول و دستمزد ماهانه + BenefitsIncludedContinuous = benefitsIncludedContinuous, //مزایای غیر مشمول * BenefitsIncludedNonContinuous = benefitsIncludedNonContinuous, @@ -636,9 +643,9 @@ public class InsuranceListApplication: IInsuranceListApplication }; - }).ToList(); + }).ToList(); Console.WriteLine("New Compute : " + watch.Elapsed); - watch.Stop(); + watch.Stop(); watch.Start(); @@ -951,28 +958,28 @@ public class InsuranceListApplication: IInsuranceListApplication result.IsExist = true; result.IsBlock = isBolock; } - + return result; } - public double MarriedAllowance(string maritalStatus,long jobId, bool includedStatus, - int countWorkingDays, double marriedAlowance,int endMonthCurrentDay) + public double MarriedAllowance(string maritalStatus, long jobId, bool includedStatus, + int countWorkingDays, double marriedAlowance, int endMonthCurrentDay) { - bool isManager = jobId is 10 or 16 or 17 or 18 or 3498; - if (isManager)//اگر مدیر عامل بود - return 0; - if (maritalStatus != "متاهل")//اگر مجرد بود - return 0; - - if(countWorkingDays == endMonthCurrentDay) - return (marriedAlowance); + bool isManager = jobId is 10 or 16 or 17 or 18 or 3498; + if (isManager)//اگر مدیر عامل بود + return 0; + if (maritalStatus != "متاهل")//اگر مجرد بود + return 0; + + if (countWorkingDays == endMonthCurrentDay) + return (marriedAlowance); return endMonthCurrentDay switch { - 29 => GetRoundValue((marriedAlowance / 29) * countWorkingDays), - 30 => GetRoundValue((marriedAlowance / 30) * countWorkingDays), - 31 => GetRoundValue((marriedAlowance / 31) * countWorkingDays), - _ => marriedAlowance + 29 => GetRoundValue((marriedAlowance / 29) * countWorkingDays), + 30 => GetRoundValue((marriedAlowance / 30) * countWorkingDays), + 31 => GetRoundValue((marriedAlowance / 31) * countWorkingDays), + _ => marriedAlowance }; } @@ -1147,9 +1154,9 @@ public class InsuranceListApplication: IInsuranceListApplication string strValue = value.ToString(); if (strValue.IndexOf('.') > -1) { - - string a = strValue.Substring(strValue.IndexOf('.')+1, 1); + + string a = strValue.Substring(strValue.IndexOf('.') + 1, 1); if (int.Parse(a) > 5) { return (Math.Round(value, MidpointRounding.ToPositiveInfinity)); @@ -1166,13 +1173,13 @@ public class InsuranceListApplication: IInsuranceListApplication //محاسبه پرسنل در جدول - DSKWOR EDIT public MainEmployeeDetailsViewModel SearchEmployeeListForEditByInsuranceListId(EmployeeForEditInsuranceListSearchModel searchModel) { - var mainEmployeeDetailsViewModel= new MainEmployeeDetailsViewModel(); - var mainEmployeeDetailsViewModel2= new MainEmployeeDetailsViewModel(); - var mainEmployeeDetailsViewModelForNewPersonel= new MainEmployeeDetailsViewModel(); + var mainEmployeeDetailsViewModel = new MainEmployeeDetailsViewModel(); + var mainEmployeeDetailsViewModel2 = new MainEmployeeDetailsViewModel(); + var mainEmployeeDetailsViewModelForNewPersonel = new MainEmployeeDetailsViewModel(); - List ids = searchModel.WorkshopIds.Where(x=>x!=searchModel.WorkshopId).ToList(); + List ids = searchModel.WorkshopIds.Where(x => x != searchModel.WorkshopId).ToList(); searchModel.Month = searchModel.Month.PadLeft(2, '0'); - if (!_insuranceListRepositpry.Exists(x => x.Year == searchModel.Year && x.Month == searchModel.Month && (ids!=null && ids.Count > 0 && ids.Contains(x.WorkshopId)))) + if (!_insuranceListRepositpry.Exists(x => x.Year == searchModel.Year && x.Month == searchModel.Month && (ids != null && ids.Count > 0 && ids.Contains(x.WorkshopId)))) { mainEmployeeDetailsViewModel = _insuranceListRepositpry.SearchEmployeeListForEditByInsuranceListId(searchModel); @@ -1194,11 +1201,11 @@ public class InsuranceListApplication: IInsuranceListApplication var searchModelForCreate = new EmployeeForCreateInsuranceListSearchModel(); searchModelForCreate.Month = searchModel.Month; searchModelForCreate.Year = searchModel.Year; - searchModelForCreate.WorkshopIds=new List(){ searchModel.WorkshopId }; + searchModelForCreate.WorkshopIds = new List() { searchModel.WorkshopId }; var leftWorkInsuranceViewModelList = _leftWorkInsuranceApplication.SearchForCreateInsuranceList(searchModelForCreate); var newEmployeeId = leftWorkInsuranceViewModelList.Select(x => x.EmployeeId).ToList(); var oldEmployeeId = mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList.Select(x => x.EmployeeId).ToList(); - if(!newEmployeeId.SequenceEqual(oldEmployeeId)) + if (!newEmployeeId.SequenceEqual(oldEmployeeId)) { var employeeAddIds = new List(); var employeeRemoveIds = new List(); @@ -1223,14 +1230,14 @@ public class InsuranceListApplication: IInsuranceListApplication if (employeeAddIds != null && employeeAddIds.Count > 0) { leftWorkInsuranceViewModelList = leftWorkInsuranceViewModelList.Where(x => employeeAddIds.Contains(x.EmployeeId)).ToList(); - mainEmployeeDetailsViewModelForNewPersonel = GetEmployeeForInsuranceList(leftWorkInsuranceViewModelList,searchModel); + mainEmployeeDetailsViewModelForNewPersonel = GetEmployeeForInsuranceList(leftWorkInsuranceViewModelList, searchModel); if (mainEmployeeDetailsViewModelForNewPersonel.EmployeeDetailsForInsuranceList != null && mainEmployeeDetailsViewModelForNewPersonel.EmployeeDetailsForInsuranceList.Count > 0) { mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList = mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList.Union(mainEmployeeDetailsViewModelForNewPersonel.EmployeeDetailsForInsuranceList).ToList(); } } - if (employeeRemoveIds != null && employeeRemoveIds.Count>0) + if (employeeRemoveIds != null && employeeRemoveIds.Count > 0) { mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList = mainEmployeeDetailsViewModel .EmployeeDetailsForInsuranceList.Where(x => !employeeRemoveIds.Contains(x.EmployeeId)) @@ -1251,12 +1258,12 @@ public class InsuranceListApplication: IInsuranceListApplication var day = 1; var persianCurrentStartDate = new PersianDateTime(year, month, day); var persianCurrentEndDate = new PersianDateTime(year, month, dayMonthCurrent); - + var model = new YearlySalarySearchModel(); model.StartDateGr = startMonthCurrent.ToGeorgianDateTime(); model.EndDateGr = endMonthCurrent.ToGeorgianDateTime(); model.year = searchModel.Year; - + var yearlysalaryItem = new YearlysalaryItemViewModel(); var housingAllowance = new YearlysalaryItemViewModel(); var consumableItems = new YearlysalaryItemViewModel(); @@ -1270,7 +1277,7 @@ public class InsuranceListApplication: IInsuranceListApplication int endWork = 0; item.IsMaritalStatusSet = // آیا وضعیت تاهل پرسنل ست شده است !string.IsNullOrWhiteSpace(employeeObject.MaritalStatus); - + #region HasConfilictLeftWork bool hasConfilict = false; @@ -1325,7 +1332,7 @@ public class InsuranceListApplication: IInsuranceListApplication } //ترک کارش در ماه و سال جاری بود نمایش داده شود - if (!string.IsNullOrEmpty(item.LeftWorkDate) && !item.LeftWorkDate.Contains(searchModel.Year+"/"+searchModel.Month ) ) + if (!string.IsNullOrEmpty(item.LeftWorkDate) && !item.LeftWorkDate.Contains(searchModel.Year + "/" + searchModel.Month)) { item.LeftWorkDate = string.Empty; item.LeftWorkDateGr = null; @@ -1366,8 +1373,8 @@ public class InsuranceListApplication: IInsuranceListApplication var monthStartDateUser = Convert.ToInt32(item.StartWorkDate.Substring(5, 2)); var dayStartDateUser = Convert.ToInt32(item.StartWorkDate.Substring(8, 2)); var persianStartDateUser = new PersianDateTime(yearStartDateUser, monthStartDateUser, dayStartDateUser); - - if(persianStartDateUser <= persianCurrentStartDate) + + if (persianStartDateUser <= persianCurrentStartDate) { startWork = 1; } @@ -1376,18 +1383,18 @@ public class InsuranceListApplication: IInsuranceListApplication startWork = dayStartDateUser; } - if(persianStartDateUser < persianCurrentStartDate) + if (persianStartDateUser < persianCurrentStartDate) item.HasStartWorkInMonth = false; else item.HasStartWorkInMonth = true; - + if (hasConfilict) //اگر ترک کار شخص تغییر کرده بود، دوباره محاسبه شود { item.StartMonthCurrent = startMonthCurrent; item.HousingAllowance = housingAllowance.ItemValue; item.ConsumableItems = consumableItems.ItemValue; - item.DailyWage= ComputeDailyWage(yearlysalaryItem.ItemValue, item.EmployeeId, searchModel.WorkshopId, searchModel.Year); + item.DailyWage = ComputeDailyWage(yearlysalaryItem.ItemValue, item.EmployeeId, searchModel.WorkshopId, searchModel.Year); item.DailyWageStr = item.DailyWage.ToMoney(); } else @@ -1447,15 +1454,15 @@ public class InsuranceListApplication: IInsuranceListApplication item.UnEmploymentInsurance = GetRoundValue(unEmploymentInsurance); // item.BenefitsIncludedNonContinuous = item.BenefitsIncludedContinuous; - item.IncludedAndNotIncluded = item.BenefitsIncludedContinuous + item.BenefitsIncludedNonContinuous; + item.IncludedAndNotIncluded = item.BenefitsIncludedContinuous + item.BenefitsIncludedNonContinuous; } - + } - if (mainEmployeeDetailsViewModel2.EmployeeDetailsForInsuranceList!=null && mainEmployeeDetailsViewModel2.EmployeeDetailsForInsuranceList.Count>0) + if (mainEmployeeDetailsViewModel2.EmployeeDetailsForInsuranceList != null && mainEmployeeDetailsViewModel2.EmployeeDetailsForInsuranceList.Count > 0) mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList = mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList.Union(mainEmployeeDetailsViewModel2.EmployeeDetailsForInsuranceList).OrderByDescending(x => x.HasLeftWorkInMonth).ThenByDescending(x => x.HasStartWorkInMonth).ThenBy(x => x.LName).ToList(); else mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList = mainEmployeeDetailsViewModel.EmployeeDetailsForInsuranceList.OrderByDescending(x => x.HasLeftWorkInMonth).ThenByDescending(x => x.HasStartWorkInMonth).ThenBy(x => x.LName).ToList(); - + mainEmployeeDetailsViewModel.IsExist = false; mainEmployeeDetailsViewModel.MaritalStatus = maritalStatus.ItemValue; } @@ -1486,7 +1493,7 @@ public class InsuranceListApplication: IInsuranceListApplication // endDateGr); var employeeInsurancDataPreviusList = - _insuranceListRepositpry.GetEmployeeInsuranceDataForEdit(searchModel.InsuranceId,startDateGr,endDateGr); + _insuranceListRepositpry.GetEmployeeInsuranceDataForEdit(searchModel.InsuranceId, startDateGr, endDateGr); var computeResult = employeeInsurancDataPreviusList.Select(employeeData => { @@ -1550,12 +1557,12 @@ public class InsuranceListApplication: IInsuranceListApplication overTimePayIsSet = false; } return new EmployeeDetailsForInsuranceListViewModel - { + { #region EmployeeInfo EmployeeHasCheckout = employeeHasCheckout, EmployeeInsurancListDataId = employeeData.EmployeeInsurancListDataId, - InsuranceEmployeeInformationId = employeeData.InsuranceEmployeeInformationId, + InsuranceEmployeeInformationId = employeeData.InsuranceEmployeeInformationId, EmployeeId = employeeData.EmployeeId, FName = employeeData.FName, LName = employeeData.LName, @@ -1676,9 +1683,9 @@ public class InsuranceListApplication: IInsuranceListApplication return result; } - private double? GetDailyWageFixedSalary(string year, long workshopId,long employeeId,DateTime? startDateGr, DateTime? endDateGr, long jobId, string population, long? insuranceJobId) + private double? GetDailyWageFixedSalary(string year, long workshopId, long employeeId, DateTime? startDateGr, DateTime? endDateGr, long jobId, string population, long? insuranceJobId) { - + double? result = 0; string month = $"{startDateGr.ToFarsi()}".Substring(5, 2); //اگر مشاغل مقطوع بود و شغلش کارفرما بود @@ -1727,7 +1734,7 @@ public class InsuranceListApplication: IInsuranceListApplication { var inJob = _insuranceJobItemRepository - .GetInsuranceJobItemByInsuranceJobId((long)workshop.InsuranceJobId,year, month); + .GetInsuranceJobItemByInsuranceJobId((long)workshop.InsuranceJobId, year, month); if (workshop.Population == "MoreThan500") { var max = inJob.MaxBy(x => x.PercentageMoreThan); @@ -1776,9 +1783,9 @@ public class InsuranceListApplication: IInsuranceListApplication else { - var searchModel = new InsuranceJobItemSearchModel(); - searchModel.InsuranceJobId = (long)insuranceJobId; - var JobItem = _insuranceJobItemRepository.GetInsuranceJobItemByInsuranceJobIdForFixedSalary((long)insuranceJobId, jobId, year, month); + var searchModel = new InsuranceJobItemSearchModel(); + searchModel.InsuranceJobId = (long)insuranceJobId; + var JobItem = _insuranceJobItemRepository.GetInsuranceJobItemByInsuranceJobIdForFixedSalary((long)insuranceJobId, jobId, year, month); if (JobItem != null && JobItem.Id != 0) { @@ -1804,7 +1811,7 @@ public class InsuranceListApplication: IInsuranceListApplication } } - + } } catch (Exception) @@ -1827,28 +1834,28 @@ public class InsuranceListApplication: IInsuranceListApplication /// /// /// - private double GetMonthlyBenefits(int endMonthCurrentDay, double consumableItemsItemValue, double housingAllowanceItemValue,double maritalStatus, int countWorkingDays, string typeOfInsuranceSendWorkshop, long jobId,long employeeId,bool includeStatus) + private double GetMonthlyBenefits(int endMonthCurrentDay, double consumableItemsItemValue, double housingAllowanceItemValue, double maritalStatus, int countWorkingDays, string typeOfInsuranceSendWorkshop, long jobId, long employeeId, bool includeStatus) { - //ToDo - //افزودن شرط مشمول مزایای + //ToDo + //افزودن شرط مشمول مزایای - //اگر پرسنل کارفرما بود و نوع لیست کارگاه کمک دولت بود مزایا محاسبه نشود - //اگر تیک مشمول مزایا در ترک کار خاموش بود مزایا نگیرد + //اگر پرسنل کارفرما بود و نوع لیست کارگاه کمک دولت بود مزایا محاسبه نشود + //اگر تیک مشمول مزایا در ترک کار خاموش بود مزایا نگیرد - bool isManager = jobId is 10 or 16 or 17 or 18 or 3498; - if (isManager && !includeStatus) + bool isManager = jobId is 10 or 16 or 17 or 18 or 3498; + if (isManager && !includeStatus) return 0; //پرسنل استثناء if (employeeId == 42783) return 53082855; - - //if(employeeId == 8859) - // return GetRoundValue(((consumableItemsItemValue + housingAllowanceItemValue + maritalStatus) / 31) * countWorkingDays); - //مزایای ماهانه با توجه به پایان ماه که 30 یا 31 روزه است، متفاوت می باشد - //برای ماه 29 روزه هم تقسیم بر 30 می شود. - if (countWorkingDays == endMonthCurrentDay) + //if(employeeId == 8859) + // return GetRoundValue(((consumableItemsItemValue + housingAllowanceItemValue + maritalStatus) / 31) * countWorkingDays); + + //مزایای ماهانه با توجه به پایان ماه که 30 یا 31 روزه است، متفاوت می باشد + //برای ماه 29 روزه هم تقسیم بر 30 می شود. + if (countWorkingDays == endMonthCurrentDay) return (consumableItemsItemValue + housingAllowanceItemValue + maritalStatus); else if (endMonthCurrentDay == 29)//farokhiChanges در خط پایین عدد 30 رو به 29 تغییر دادم return GetRoundValue(((consumableItemsItemValue + housingAllowanceItemValue + maritalStatus) / 29) * countWorkingDays); @@ -1860,31 +1867,31 @@ public class InsuranceListApplication: IInsuranceListApplication return GetRoundValue(((consumableItemsItemValue + housingAllowanceItemValue + maritalStatus) / endMonthCurrentDay) * countWorkingDays); } - - private double ComputeDailyWage(double yearlysalaryItemValue, long employeeId, long workshopId, string year) + + private double ComputeDailyWage(double yearlysalaryItemValue, long employeeId, long workshopId, string year) { double dailyWage = yearlysalaryItemValue; - InsuranceListSearchModel searchModel = new InsuranceListSearchModel(); + InsuranceListSearchModel searchModel = new InsuranceListSearchModel(); var insuransList = _insuranceListRepositpry.GetInsuranceListByWorkshopIdAndYear(workshopId, year); if (insuransList != null) { - var employeeInsurancListData = _employeeInsurancListDataRepository.GetEmployeeInsurancListDataByEmployeeIdAndInsuranceListId( employeeId, insuransList.Id); - if (employeeInsurancListData != null && employeeInsurancListData.DailyWage> dailyWage) + var employeeInsurancListData = _employeeInsurancListDataRepository.GetEmployeeInsurancListDataByEmployeeIdAndInsuranceListId(employeeId, insuransList.Id); + if (employeeInsurancListData != null && employeeInsurancListData.DailyWage > dailyWage) { - dailyWage=employeeInsurancListData.DailyWage; + dailyWage = employeeInsurancListData.DailyWage; } } dailyWage = employeeId == 6536 ? 9399512 : dailyWage; return dailyWage; } - public MainEmployeeDetailsViewModel GetEmployeeForInsuranceList(List leftWorkInsuranceViewModelList, EmployeeForEditInsuranceListSearchModel searchModel) + public MainEmployeeDetailsViewModel GetEmployeeForInsuranceList(List leftWorkInsuranceViewModelList, EmployeeForEditInsuranceListSearchModel searchModel) { var result = new MainEmployeeDetailsViewModel(); List list = new List(); - int leftWorkInsuranceCount= leftWorkInsuranceViewModelList.Count(); + int leftWorkInsuranceCount = leftWorkInsuranceViewModelList.Count(); string startMonthCurrent = searchModel.Year + "/" + searchModel.Month + "/01"; string endMonthCurrent = startMonthCurrent.FindeEndOfMonth(); @@ -1893,7 +1900,7 @@ public class InsuranceListApplication: IInsuranceListApplication model.EndDateGr = endMonthCurrent.ToGeorgianDateTime(); model.year = searchModel.Year; - + var yearSalaryObj = _yearlySalaryApplication.GetDetailsBySearchModel(model); @@ -1953,7 +1960,7 @@ public class InsuranceListApplication: IInsuranceListApplication employeeDetailsForInsuranceObj.FName = employeeObject.FName; employeeDetailsForInsuranceObj.LName = employeeObject.LName; employeeDetailsForInsuranceObj.FatherName = employeeObject.FatherName; - employeeDetailsForInsuranceObj.DateOfBirth = employeeObject.DateOfBirth=="1300/10/11"?"": employeeObject.DateOfBirth; + employeeDetailsForInsuranceObj.DateOfBirth = employeeObject.DateOfBirth == "1300/10/11" ? "" : employeeObject.DateOfBirth; employeeDetailsForInsuranceObj.DateOfIssue = employeeObject.DateOfIssue; employeeDetailsForInsuranceObj.PlaceOfIssue = employeeObject.PlaceOfIssue; employeeDetailsForInsuranceObj.NationalCode = employeeObject.NationalCode; @@ -2059,8 +2066,8 @@ public class InsuranceListApplication: IInsuranceListApplication case 40469://ثابت countWorkingDays = 7; break; - //case 9950://ثابت - // countWorkingDays = 15; + //case 9950://ثابت + // countWorkingDays = 15; break; case 9640://ثابت countWorkingDays = 15; @@ -2071,9 +2078,9 @@ public class InsuranceListApplication: IInsuranceListApplication case 6219://ثابت countWorkingDays = 15; break; - //case 7897://ثابت - // countWorkingDays = 15; - // break; + //case 7897://ثابت + // countWorkingDays = 15; + // break; } ; #endregion @@ -2085,17 +2092,17 @@ public class InsuranceListApplication: IInsuranceListApplication double dailyWage = employeeDetailsForInsuranceObj.DailyWage; if (searchModel.FixedSalary) { - dailyWage = Convert.ToDouble(GetDailyWageFixedSalary(searchModel.Year, item.WorkshopId,item.EmployeeId, model.StartDateGr, model.EndDateGr, item.JobId, searchModel.Population, searchModel.InsuranceJobId)); + dailyWage = Convert.ToDouble(GetDailyWageFixedSalary(searchModel.Year, item.WorkshopId, item.EmployeeId, model.StartDateGr, model.EndDateGr, item.JobId, searchModel.Population, searchModel.InsuranceJobId)); employeeDetailsForInsuranceObj.HasConfilictJobs = (dailyWage == 0 ? true : false); } #endregion if (yearlysalaryItem != null) { - if(!searchModel.FixedSalary ) + if (!searchModel.FixedSalary) { //dailyWage= yearlysalaryItem.ItemValue; - dailyWage = ComputeDailyWage(yearlysalaryItem.ItemValue, item.EmployeeId,item.WorkshopId, searchModel.Year) ; + dailyWage = ComputeDailyWage(yearlysalaryItem.ItemValue, item.EmployeeId, item.WorkshopId, searchModel.Year); } employeeDetailsForInsuranceObj.DailyWage = GetRoundValue(dailyWage); employeeDetailsForInsuranceObj.DailyWageStr = employeeDetailsForInsuranceObj.DailyWage.ToMoney(); @@ -2119,8 +2126,8 @@ public class InsuranceListApplication: IInsuranceListApplication employeeDetailsForInsuranceObj.MonthlyBenefits = 0; } - employeeDetailsForInsuranceObj.BenefitsIncludedContinuous =employeeDetailsForInsuranceObj.MonthlyBenefits + employeeDetailsForInsuranceObj.MonthlySalary; - + employeeDetailsForInsuranceObj.BenefitsIncludedContinuous = employeeDetailsForInsuranceObj.MonthlyBenefits + employeeDetailsForInsuranceObj.MonthlySalary; + //if ((!item.IncludeStatus &&(item.JobId == 10 || item.JobId == 17 || item.JobId == 18 || item.JobId == 16)) ||(item.IncludeStatus && item.JobId == 10)) // 10 --> karfarma //{ // var insuranceShare2 =(employeeDetailsForInsuranceObj.BenefitsIncludedContinuous * 27) / 100; @@ -2133,14 +2140,14 @@ public class InsuranceListApplication: IInsuranceListApplication //} var employerShare = (employeeDetailsForInsuranceObj.BenefitsIncludedContinuous * 20) / 100; - employeeDetailsForInsuranceObj.EmployerShare = GetRoundValue(employerShare); //Math.Round(employerShare, MidpointRounding.ToPositiveInfinity); + employeeDetailsForInsuranceObj.EmployerShare = GetRoundValue(employerShare); //Math.Round(employerShare, MidpointRounding.ToPositiveInfinity); //if (searchModel.TypeOfInsuranceSendWorkshop == "Govermentlist" && item.JobId==10)//کمک دولت //{employeeDetailsForInsuranceObj.InsuranceShare = 0;} - var unEmploymentInsurance =(employeeDetailsForInsuranceObj.BenefitsIncludedContinuous * 3) / 100; + var unEmploymentInsurance = (employeeDetailsForInsuranceObj.BenefitsIncludedContinuous * 3) / 100; employeeDetailsForInsuranceObj.UnEmploymentInsurance = GetRoundValue(unEmploymentInsurance); employeeDetailsForInsuranceObj.BenefitsIncludedNonContinuous = employeeDetailsForInsuranceObj.BenefitsIncludedNonContinuous; @@ -2195,7 +2202,119 @@ public class InsuranceListApplication: IInsuranceListApplication public double GetMonthlyBaseYear(double dayliBase, int countWorkingDays) { - double res =GetRoundValue(dayliBase * countWorkingDays); + double res = GetRoundValue(dayliBase * countWorkingDays); return res; } + + #region Mahan + + + + public async Task ConfirmInsuranceOperation(InsuranceListConfirmOperation command) + { + // Improved version of the ConfirmInsuranceOperation method's main logic + async Task CreateMediaAsync(InsuranceList insuranceList, string insuranceType, IFormFile file) + { + var path = Path.Combine(_mediaRepository.BasePath, "InsuranceList", $"{insuranceList.Year}_{insuranceList.Month}", insuranceList.id.ToString()); + Directory.CreateDirectory(path); + + string uniqueFileName = $"{insuranceType}_{Path.GetFileNameWithoutExtension(file.FileName)}_{DateTime.Now.Ticks}{Path.GetExtension(file.FileName)}"; + string filePath = Path.Combine(path, uniqueFileName); + + await using (var stream = new FileStream(filePath, FileMode.Create)) + { + await file.CopyToAsync(stream); + } + var type = Path.GetExtension(filePath); + var media = new Media(filePath, type, "فایل", "InsuranceList"); + await _mediaRepository.CreateAsync(media); + await _mediaRepository.SaveChangesAsync(); + return media.id; + } + + var op = new OperationResult(); + var insuranceList = _insuranceListRepositpry.Get(command.InsuranceListId); + if (insuranceList == null) + return op.Failed("لیست بیمه پیدا نشد"); + + bool completeDebt = false, completeInspection = false, completeApproval = false; + + // Debt Section + if (command.Debt.Type != InsuranceListDebtType.None) + { + var debt = command.Debt; + if (string.IsNullOrWhiteSpace(debt.DebtDate)) + return op.Failed("لطفا تاریخ بدهی را وارد کنید"); + if (!debt.DebtDate.TryToGeorgianDateTime(out var debtDateGr)) + return op.Failed("تاریخ بدهی نامعتبر است"); + + if (debt.DebtFile is not { Length: > 0 }) + return op.Failed("لطفا فایل بدهی را وارد کنید"); + + if (debt.DebtFile.Length > 20_000_000) + return op.Failed("حجم فایل نمیتواند از 20 مگابایت بیشتر باشد"); + + var debtAmount = debt.Amount.MoneyToDouble(); + if (debtAmount <= 0) + return op.Failed("مبلغ بدهی نامعتبر است"); + + var mediaId = await CreateMediaAsync(insuranceList, "debt", debt.DebtFile); + var debtEntity = new InsuranceListDebt(debt.Type, debtDateGr, debtAmount, mediaId); + insuranceList.SetDebt(debtEntity); + completeDebt = true; + } + + // Inspection Section + if (command.Inspection.Type != InsuraceListInspectionType.None) + { + var inspection = command.Inspection; + if (string.IsNullOrWhiteSpace(inspection.LastInspectionDate)) + return op.Failed("لطفا تاریخ بازرسی را وارد کنید"); + + if (!inspection.LastInspectionDate.TryToGeorgianDateTime(out var inspectionDateGr)) + return op.Failed("تاریخ بازرسی نامعتبر است"); + + if (inspection.InspectionFile is not { Length: > 0 }) + return op.Failed("لطفا فایل بازرسی را وارد کنید"); + + if (inspection.InspectionFile.Length > 20_000_000) + return op.Failed("حجم فایل نمیتواند از 20 مگابایت بیشتر باشد"); + + var mediaId = await CreateMediaAsync(insuranceList, "inspection", inspection.InspectionFile); + var inspectionEntity = new InsuranceListInspection(inspection.Type, inspectionDateGr, mediaId); + insuranceList.SetInspection(inspectionEntity); + completeInspection = true; + } + + // Approval Section + if (command.Approval.ApprovalStatus != InsuranceListEmployerApprovalStatus.None) + { + var approval = command.Approval; + if (approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.VerbalApproval) + { + if (string.IsNullOrWhiteSpace(approval.Description)) + return op.Failed("لطفا توضیحات را وارد کنید"); + + if (approval.Description.Length < 15) + return op.Failed("توضیحات باید حداقل 15 کاراکتر باشد"); + } + var approvalEntity = new InsuranceListEmployerApproval(approval.ApprovalStatus, approval.Description); + insuranceList.SetEmployerApproval(approvalEntity); + completeApproval = true; + } + + // Final Confirmation + if (command.ConfirmSentList) + { + if (!(completeApproval && completeDebt && completeInspection)) + return op.Failed("تا زمانی که تمامی بخش ها پر نشده باشد نمیتوانید لیست را ارسال کنید"); + + insuranceList.SetConfirmSentlist(true); + } + + await _insuranceListRepositpry.SaveChangesAsync(); + return op.Succcedded(); + + } + #endregion } \ No newline at end of file diff --git a/CompanyManagment.EFCore/Mapping/InsuranceListMapping.cs b/CompanyManagment.EFCore/Mapping/InsuranceListMapping.cs index c6130319..91fa7198 100644 --- a/CompanyManagment.EFCore/Mapping/InsuranceListMapping.cs +++ b/CompanyManagment.EFCore/Mapping/InsuranceListMapping.cs @@ -16,6 +16,7 @@ public class InsuranceListMapping : IEntityTypeConfiguration builder.ComplexProperty(x => x.Inspection, inspection => { + inspection.IsRequired(); inspection.Property(x => x.Type).HasConversion().HasMaxLength(50); inspection.Property(x => x.LastInspectionDateTime); inspection.Property(x => x.MediaId); @@ -23,6 +24,7 @@ public class InsuranceListMapping : IEntityTypeConfiguration builder.ComplexProperty(x => x.Debt, debt => { + debt.IsRequired(); debt.Property(x => x.Type).HasConversion().HasMaxLength(50); debt.Property(x => x.DebtDate); debt.Property(x => x.Amount); @@ -31,6 +33,7 @@ public class InsuranceListMapping : IEntityTypeConfiguration builder.ComplexProperty(x => x.EmployerApproval, approval => { + approval.IsRequired(); approval.Property(x => x.Status).HasConversion().HasMaxLength(50); approval.Property(x => x.Description).HasMaxLength(500); }); diff --git a/CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.Designer.cs b/CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.Designer.cs new file mode 100644 index 00000000..d587468b --- /dev/null +++ b/CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.Designer.cs @@ -0,0 +1,9589 @@ +// +using System; +using System.Collections.Generic; +using CompanyManagment.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace CompanyManagment.EFCore.Migrations +{ + [DbContext(typeof(CompanyContext))] + [Migration("20250521125646_add inspection-debt-approval to insurance list")] + partial class addinspectiondebtapprovaltoinsurancelist + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Company.Domain.AndroidApkVersionAgg.AndroidApkVersion", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VersionCode") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("VersionName") + .HasMaxLength(35) + .HasColumnType("nvarchar(35)"); + + b.HasKey("id"); + + b.ToTable("AndroidApkVersions", (string)null); + }); + + modelBuilder.Entity("Company.Domain.BankAgg.Bank", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BankLogoMediaId") + .HasColumnType("bigint"); + + b.Property("BankName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.ToTable("Banks", (string)null); + }); + + modelBuilder.Entity("Company.Domain.BillAgg.EntityBill", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Appointed") + .HasColumnType("nvarchar(max)"); + + b.Property("Contact") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActiveString") + .HasColumnType("nvarchar(max)"); + + b.Property("ProcessingStage") + .HasColumnType("nvarchar(max)"); + + b.Property("SubjectBill") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.HasKey("id"); + + b.ToTable("TextManager_Bill", (string)null); + }); + + modelBuilder.Entity("Company.Domain.Board.Board", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BoardChairman") + .HasColumnType("nvarchar(max)"); + + b.Property("BoardType_Id") + .HasColumnType("int"); + + b.Property("Branch") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DisputeResolutionPetitionDate") + .HasColumnType("datetime2"); + + b.Property("ExpertReport") + .HasColumnType("nvarchar(max)"); + + b.Property("File_Id") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("BoardType_Id"); + + b.HasIndex("File_Id"); + + b.ToTable("Boards", (string)null); + }); + + modelBuilder.Entity("Company.Domain.BoardType.BoardType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("BoardTypes", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ChapterAgg.EntityChapter", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Chapter") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveString") + .HasColumnType("nvarchar(max)"); + + b.Property("Subtitle_Id") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("Subtitle_Id"); + + b.ToTable("TextManager_Chapter", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CheckoutAgg.Checkout", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AbsenceDeduction") + .HasColumnType("float"); + + b.Property("AbsencePeriod") + .HasColumnType("float"); + + b.Property("AbsenceValue") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ArchiveCode") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("AverageHoursPerDay") + .HasColumnType("float"); + + b.Property("BaseYearsPay") + .HasColumnType("float"); + + b.Property("BonusesPay") + .HasColumnType("float"); + + b.Property("ConsumableItems") + .HasColumnType("float"); + + b.Property("ContractEnd") + .HasColumnType("datetime2"); + + b.Property("ContractId") + .HasColumnType("bigint"); + + b.Property("ContractNo") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContractStart") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CreditLeaves") + .HasColumnType("float"); + + b.Property("DateOfBirth") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("EmployeeFullName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("FamilyAllowance") + .HasColumnType("float"); + + b.Property("FathersName") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("FridayPay") + .HasColumnType("float"); + + b.Property("FridayWorkValue") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("HasRollCall") + .HasColumnType("bit"); + + b.Property("HousingAllowance") + .HasColumnType("float"); + + b.Property("InstallmentDeduction") + .HasColumnType("float"); + + b.Property("InsuranceDeduction") + .HasColumnType("float"); + + b.Property("IsActiveString") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("LeaveCheckout") + .HasColumnType("bit"); + + b.Property("LeavePay") + .HasColumnType("float"); + + b.Property("MarriedAllowance") + .HasColumnType("float"); + + b.Property("MissionPay") + .HasColumnType("float"); + + b.Property("Month") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("MonthlySalary") + .HasColumnType("float"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("NightworkPay") + .HasColumnType("float"); + + b.Property("OverNightWorkValue") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("OverTimeWorkValue") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("OvertimePay") + .HasColumnType("float"); + + b.Property("PersonnelCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("RewardPay") + .HasColumnType("float"); + + b.Property("RotatingShiftValue") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("SalaryAidDeduction") + .HasColumnType("float"); + + b.Property("ShiftPay") + .HasColumnType("float"); + + b.Property("Signature") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("SumOfWorkingDays") + .HasMaxLength(6) + .HasColumnType("nvarchar(6)"); + + b.Property("TaxDeducation") + .HasColumnType("float"); + + b.Property("TotalClaims") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("TotalDayOfBunosesCompute") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TotalDayOfLeaveCompute") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TotalDayOfYearsCompute") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TotalDeductions") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("TotalPayment") + .HasColumnType("float"); + + b.Property("WorkingHoursId") + .HasColumnType("bigint"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopName") + .HasMaxLength(70) + .HasColumnType("nvarchar(70)"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b.Property("YearsPay") + .HasColumnType("float"); + + b.HasKey("id"); + + b.HasIndex("WorkshopId"); + + b.ToTable("Checkouts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ClassifiedSalaryAgg.ClassifiedSalary", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("Group1") + .HasColumnType("float"); + + b.Property("Group10") + .HasColumnType("float"); + + b.Property("Group11") + .HasColumnType("float"); + + b.Property("Group12") + .HasColumnType("float"); + + b.Property("Group13") + .HasColumnType("float"); + + b.Property("Group14") + .HasColumnType("float"); + + b.Property("Group15") + .HasColumnType("float"); + + b.Property("Group16") + .HasColumnType("float"); + + b.Property("Group17") + .HasColumnType("float"); + + b.Property("Group18") + .HasColumnType("float"); + + b.Property("Group19") + .HasColumnType("float"); + + b.Property("Group2") + .HasColumnType("float"); + + b.Property("Group20") + .HasColumnType("float"); + + b.Property("Group3") + .HasColumnType("float"); + + b.Property("Group4") + .HasColumnType("float"); + + b.Property("Group5") + .HasColumnType("float"); + + b.Property("Group6") + .HasColumnType("float"); + + b.Property("Group7") + .HasColumnType("float"); + + b.Property("Group8") + .HasColumnType("float"); + + b.Property("Group9") + .HasColumnType("float"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("ClassifiedSalaries", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ClientEmployeeWorkshopAgg.ClientEmployeeWorkshop", b => + { + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.HasKey("WorkshopId", "EmployeeId"); + + b.HasIndex("EmployeeId"); + + b.ToTable("ClientWorkshopEmployee", (string)null); + }); + + modelBuilder.Entity("Company.Domain.Contact2Agg.EntityContact", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveString") + .HasColumnType("nvarchar(max)"); + + b.Property("NameContact") + .HasColumnType("nvarchar(max)"); + + b.Property("Signature") + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.ToTable("TextManager_Contact", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("AgentPhone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ArchiveCode") + .HasColumnType("int"); + + b.Property("BlockTimes") + .HasColumnType("int"); + + b.Property("City") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("FName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FatherName") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Gender") + .IsRequired() + .HasMaxLength(6) + .HasColumnType("nvarchar(6)"); + + b.Property("IdNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IdNumberSeri") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IdNumberSerial") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsAuthenticated") + .HasColumnType("bit"); + + b.Property("IsBlock") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsLegal") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("LName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("NationalId") + .IsRequired() + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("Nationalcode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Phone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RegisterId") + .IsRequired() + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("RepresentativeFullName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RepresentativeId") + .HasColumnType("bigint"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SureName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Zone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.HasIndex("RepresentativeId"); + + b.ToTable("PersonalContractingParties", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ContractAgg.Contract", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AgreementSalary") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ArchiveCode") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ConsumableItems") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContarctStart") + .HasColumnType("datetime2"); + + b.Property("ContractEnd") + .HasColumnType("datetime2"); + + b.Property("ContractNo") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ContractPeriod") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("ContractType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DayliWage") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("EmployerId") + .HasColumnType("bigint"); + + b.Property("FamilyAllowance") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("GetWorkDate") + .HasColumnType("datetime2"); + + b.Property("HousingAllowance") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsActiveString") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("JobTypeId") + .HasColumnType("bigint"); + + b.Property("MandatoryHoursid") + .HasColumnType("bigint"); + + b.Property("PersonnelCode") + .HasColumnType("bigint"); + + b.Property("SetContractDate") + .HasColumnType("datetime2"); + + b.Property("Signature") + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("WorkingHoursWeekly") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("WorkshopAddress1") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("WorkshopAddress2") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("WorkshopIds") + .HasColumnType("bigint"); + + b.Property("YearlySalaryId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("EmployerId"); + + b.HasIndex("JobTypeId"); + + b.HasIndex("MandatoryHoursid"); + + b.HasIndex("WorkshopIds"); + + b.HasIndex("YearlySalaryId"); + + b.ToTable("Contracts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ContractingPartyAccountAgg.ContractingPartyAccount", b => + { + b.Property("PersonalContractingPartyId") + .HasColumnType("bigint"); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.HasKey("PersonalContractingPartyId", "AccountId"); + + b.ToTable("ContractingPartyAccount", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CrossJobAgg.CrossJob", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CrossJobGuildId") + .HasColumnType("bigint"); + + b.Property("EquivalentRialOver") + .HasColumnType("bigint"); + + b.Property("EquivalentRialUnder") + .HasColumnType("bigint"); + + b.Property("SalaryRatioOver") + .HasColumnType("float"); + + b.Property("SalaryRatioUnder") + .HasColumnType("float"); + + b.HasKey("id"); + + b.HasIndex("CrossJobGuildId"); + + b.ToTable("CrossJobs", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CrossJobGuildAgg.CrossJobGuild", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EconomicCode") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("CrossJobGuilds", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CrossJobItemsAgg.CrossJobItems", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CrossJobId") + .HasColumnType("bigint"); + + b.Property("JobId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("CrossJobId"); + + b.HasIndex("JobId"); + + b.ToTable("CrossJobItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CustomizeCheckoutAgg.CustomizeCheckout", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BaseYearsPay") + .HasColumnType("float"); + + b.Property("BonusesPay") + .HasColumnType("float"); + + b.Property("ContractEnd") + .HasColumnType("datetime2"); + + b.Property("ContractId") + .HasColumnType("bigint"); + + b.Property("ContractNo") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("ContractStart") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DailyWage") + .HasColumnType("float"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("EarlyExitDeduction") + .HasColumnType("float"); + + b.Property("EmployeeFName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("EmployeeLName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FamilyAllowance") + .HasColumnType("float"); + + b.Property("FineAbsenceDeduction") + .HasColumnType("float"); + + b.Property("FineDeduction") + .HasColumnType("float"); + + b.Property("FridayPay") + .HasColumnType("float"); + + b.Property("InstallmentDeduction") + .HasColumnType("float"); + + b.Property("InsuranceDeduction") + .HasColumnType("float"); + + b.Property("LateToWorkDeduction") + .HasColumnType("float"); + + b.Property("LateToWorkValue") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LeavePay") + .HasColumnType("float"); + + b.Property("MarriedAllowance") + .HasColumnType("float"); + + b.Property("MonthInt") + .HasColumnType("int"); + + b.Property("MonthlySalary") + .HasColumnType("float"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("NightWorkPay") + .HasColumnType("float"); + + b.Property("OverTimePay") + .HasColumnType("float"); + + b.Property("RewardPay") + .HasColumnType("float"); + + b.Property("SalaryAidDeduction") + .HasColumnType("float"); + + b.Property("SettingSalary") + .HasColumnType("float"); + + b.Property("ShiftPay") + .HasColumnType("float"); + + b.Property("ShiftStatus") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("SumOfWorkingDays") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxDeduction") + .HasColumnType("float"); + + b.Property("TotalClaims") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalDeductions") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalPayment") + .HasColumnType("float"); + + b.Property("WorkshopFullName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("YearInt") + .HasColumnType("int"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("CustomizeCheckouts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CustomizeCheckoutTempAgg.CustomizeCheckoutTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BaseYearsPay") + .HasColumnType("float"); + + b.Property("BonusesPay") + .HasColumnType("float"); + + b.Property("ContractEnd") + .HasColumnType("datetime2"); + + b.Property("ContractId") + .HasColumnType("bigint"); + + b.Property("ContractNo") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("ContractStart") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DailyWage") + .HasColumnType("float"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("EarlyExitDeduction") + .HasColumnType("float"); + + b.Property("EmployeeFName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("EmployeeLName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FamilyAllowance") + .HasColumnType("float"); + + b.Property("FineAbsenceDeduction") + .HasColumnType("float"); + + b.Property("FineDeduction") + .HasColumnType("float"); + + b.Property("FridayPay") + .HasColumnType("float"); + + b.Property("InstallmentDeduction") + .HasColumnType("float"); + + b.Property("InsuranceDeduction") + .HasColumnType("float"); + + b.Property("LateToWorkDeduction") + .HasColumnType("float"); + + b.Property("LateToWorkValue") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LeavePay") + .HasColumnType("float"); + + b.Property("MarriedAllowance") + .HasColumnType("float"); + + b.Property("MonthInt") + .HasColumnType("int"); + + b.Property("MonthlySalary") + .HasColumnType("float"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("NightWorkPay") + .HasColumnType("float"); + + b.Property("OverTimePay") + .HasColumnType("float"); + + b.Property("RewardPay") + .HasColumnType("float"); + + b.Property("SalaryAidDeduction") + .HasColumnType("float"); + + b.Property("SettingSalary") + .HasColumnType("float"); + + b.Property("ShiftPay") + .HasColumnType("float"); + + b.Property("ShiftStatus") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("SumOfWorkingDays") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxDeduction") + .HasColumnType("float"); + + b.Property("TotalClaims") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalDeductions") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalPayment") + .HasColumnType("float"); + + b.Property("WorkshopFullName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("YearInt") + .HasColumnType("int"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("CustomizeCheckoutTemps", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopEmployeeSettingsAgg.Entities.CustomizeWorkshopEmployeeSettings", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CustomizeWorkshopGroupSettingId") + .HasColumnType("bigint"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("FridayWork") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("HolidayWork") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("IsSettingChanged") + .HasColumnType("bit"); + + b.Property("IsShiftChanged") + .HasColumnType("bit"); + + b.Property("LeavePermittedDays") + .HasColumnType("int"); + + b.Property("Salary") + .HasColumnType("float"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopShiftStatus") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.HasKey("id"); + + b.HasIndex("CustomizeWorkshopGroupSettingId"); + + b.ToTable("CustomizeWorkshopEmployeeSettings", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CustomizeWorkshopSettingId") + .HasColumnType("bigint"); + + b.Property("FridayWork") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("GroupName") + .HasMaxLength(120) + .HasColumnType("nvarchar(120)"); + + b.Property("HolidayWork") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("IsSettingChange") + .HasColumnType("bit"); + + b.Property("IsShiftChange") + .HasColumnType("bit"); + + b.Property("LeavePermittedDays") + .HasColumnType("int"); + + b.Property("MainGroup") + .HasColumnType("bit"); + + b.Property("Salary") + .HasColumnType("float"); + + b.Property("WorkshopShiftStatus") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.HasKey("id"); + + b.HasIndex("CustomizeWorkshopSettingId"); + + b.ToTable("CustomizeWorkshopGroupSettings", (string)null); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BaseYearsPayInEndOfYear") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("BonusesPaysInEndOfMonth") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Currency") + .HasColumnType("int"); + + b.Property("EndTimeOffSet") + .HasColumnType("time"); + + b.Property("FridayWork") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("HolidayWork") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("LeavePermittedDays") + .HasColumnType("int"); + + b.Property("MaxMonthDays") + .HasColumnType("int"); + + b.Property("OverTimeThresholdMinute") + .HasColumnType("int"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopShiftStatus") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.HasKey("id"); + + b.HasIndex("WorkshopId") + .IsUnique(); + + b.ToTable("CustomizeWorkshopSettings", (string)null); + }); + + modelBuilder.Entity("Company.Domain.DateSalaryAgg.DateSalary", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndDateFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("EndDateGr") + .HasColumnType("datetime2"); + + b.Property("StartDateFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("StartDateGr") + .HasColumnType("datetime2"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b.HasKey("id"); + + b.ToTable("DateSalaries", (string)null); + }); + + modelBuilder.Entity("Company.Domain.DateSalaryItemAgg.DateSalaryItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateSalaryId") + .HasColumnType("bigint"); + + b.Property("Percent") + .HasColumnType("float"); + + b.Property("PercentageId") + .HasColumnType("bigint"); + + b.Property("Salary") + .HasColumnType("float"); + + b.HasKey("id"); + + b.HasIndex("DateSalaryId"); + + b.HasIndex("PercentageId"); + + b.ToTable("DateSalaryItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeAccountAgg.EmployeeAccount", b => + { + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.HasKey("EmployeeId", "AccountId"); + + b.ToTable("EmployeeAccounts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeAgg.Employee", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("BankBranch") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("BankCardNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("City") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("DateOfIssue") + .HasColumnType("datetime2"); + + b.Property("EservicePassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EserviceUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FatherName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FieldOfStudy") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Gender") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IdNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IdNumberSeri") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("IdNumberSerial") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("InsuranceCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("InsuranceHistoryByMonth") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("InsuranceHistoryByYear") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsActiveString") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IsAuthorized") + .HasColumnType("bit"); + + b.Property("LName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("LevelOfEducation") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MaritalStatus") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("MclsPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MclsUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MilitaryService") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Nationality") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("NumberOfChildren") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("OfficePhone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Phone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlaceOfIssue") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SanaPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SanaUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("State") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficeUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficepassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.ToTable("Employees", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeAuthorizeTempAgg.EmployeeAuthorizeTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("FName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FatherName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Gender") + .IsRequired() + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("IdNumber") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("IdNumberSeri") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("IdNumberSerial") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("LName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NationalCode") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.HasKey("id"); + + b.HasIndex("NationalCode") + .IsUnique() + .HasFilter("[NationalCode] IS NOT NULL"); + + b.ToTable("EmployeeAuthorizeTemps", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeBankInformationAgg.EmployeeBankInformation", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BankAccountNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("BankId") + .HasColumnType("bigint"); + + b.Property("CardNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("IsDefault") + .HasColumnType("bit"); + + b.Property("ShebaNumber") + .HasMaxLength(26) + .HasColumnType("nvarchar(26)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("BankId"); + + b.HasIndex("EmployeeId"); + + b.ToTable("EmployeeBankInformationSet", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeChildrenAgg.EmployeeChildren", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("FName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ParentNationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("EmployeeChildren", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeClientTempAgg.EmployeeClientTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeFullName") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("MaritalStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("StartWorkDate") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("EmployeeClientTemps"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeComputeOptionsAgg.EmployeeComputeOptions", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BonusesOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ComputeOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("YearsOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.ToTable("EmployeeComputeOptions", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentItemAgg.EmployeeDocumentItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ConfirmationDateTime") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DocumentLabel") + .IsRequired() + .HasMaxLength(31) + .HasColumnType("nvarchar(31)"); + + b.Property("DocumentStatus") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("EmployeeDocumentId") + .HasColumnType("bigint"); + + b.Property("EmployeeDocumentsAdminViewId") + .HasColumnType("bigint"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.Property("RejectionReason") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("ReviewedById") + .HasMaxLength(120) + .HasColumnType("bigint"); + + b.Property("UploaderId") + .HasColumnType("bigint"); + + b.Property("UploaderRoleId") + .HasColumnType("bigint"); + + b.Property("UploaderType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("EmployeeDocumentId"); + + b.HasIndex("EmployeeDocumentsAdminViewId"); + + b.ToTable("EmployeeDocumentItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId") + .IsUnique(); + + b.ToTable("EmployeeDocumentsAdminSelection", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("Gender") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("HasRejectedItems") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsSentToChecker") + .HasColumnType("bit"); + + b.Property("RequiredItemsSubmittedByClient") + .HasColumnType("bit"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("EmployeeDocuments", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeInsurancListDataAgg.EmployeeInsurancListData", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BaseYears") + .HasColumnType("float"); + + b.Property("BenefitsIncludedContinuous") + .HasColumnType("float"); + + b.Property("BenefitsIncludedNonContinuous") + .HasColumnType("float"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DailyWage") + .HasColumnType("float"); + + b.Property("DailyWagePlusBaseYears") + .HasColumnType("float"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("FamilyAllowance") + .HasColumnType("float"); + + b.Property("IncludeStatus") + .HasColumnType("bit"); + + b.Property("InsuranceListId") + .HasColumnType("bigint"); + + b.Property("InsuranceShare") + .HasColumnType("float"); + + b.Property("JobId") + .HasColumnType("bigint"); + + b.Property("LeftWorkDate") + .HasColumnType("datetime2(7)"); + + b.Property("MarriedAllowance") + .HasColumnType("float"); + + b.Property("MonthlyBenefits") + .HasColumnType("float"); + + b.Property("MonthlyBenefitsIncluded") + .HasColumnType("float"); + + b.Property("MonthlySalary") + .HasColumnType("float"); + + b.Property("OverTimePay") + .HasColumnType("float"); + + b.Property("StartWorkDate") + .HasColumnType("datetime2"); + + b.Property("WorkingDays") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("EmployeeInsurancListData", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployeeInsuranceRecordAgg.EmployeeInsuranceRecord", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfEnd") + .HasColumnType("datetime2"); + + b.Property("DateOfStart") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("WorkShopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WorkShopId"); + + b.ToTable("EmployeeInsuranceRecord", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EmployerAccountAgg.EmployerAccount", b => + { + b.Property("EmployerId") + .HasColumnType("bigint"); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.HasKey("EmployerId", "AccountId"); + + b.ToTable("EmployerAccounts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.Evidence.Evidence", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BoardType_Id") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("File_Id") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("BoardType_Id"); + + b.HasIndex("File_Id"); + + b.ToTable("Evidences", (string)null); + }); + + modelBuilder.Entity("Company.Domain.EvidenceDetail.EvidenceDetail", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Day") + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Evidence_Id") + .HasColumnType("bigint"); + + b.Property("FromDate") + .HasColumnType("datetime2"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("ToDate") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.HasIndex("Evidence_Id"); + + b.ToTable("EvidenceDetails", (string)null); + }); + + modelBuilder.Entity("Company.Domain.File1.File1", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ArchiveNo") + .HasColumnType("bigint"); + + b.Property("Client") + .HasColumnType("int"); + + b.Property("ClientVisitDate") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("FileClass") + .HasColumnType("nvarchar(max)"); + + b.Property("HasMandate") + .HasColumnType("int"); + + b.Property("ProceederReference") + .HasColumnType("nvarchar(max)"); + + b.Property("Reqester") + .HasColumnType("bigint"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Summoned") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("Files", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FileAlert.FileAlert", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AdditionalDeadline") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("FileState_Id") + .HasColumnType("bigint"); + + b.Property("File_Id") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("FileState_Id"); + + b.HasIndex("File_Id"); + + b.ToTable("File_Alerts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FileAndFileEmployerAgg.FileAndFileEmployer", b => + { + b.Property("FileId") + .HasColumnType("bigint"); + + b.Property("FileEmployerId") + .HasColumnType("bigint"); + + b.HasKey("FileId", "FileEmployerId"); + + b.HasIndex("FileEmployerId"); + + b.ToTable("FileAndFileEmployers", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FileEmployeeAgg.FileEmployee", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("EservicePassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EserviceUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FName") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("FatherName") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("FieldOfStudy") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Gender") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IdNumber") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("InsuranceCode") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsActive") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LName") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("LevelOfEducation") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("MaritalStatus") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("MclsPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MclsUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("OfficePhone") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Phone") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("RepresentativeFullName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RepresentativeId") + .HasColumnType("bigint"); + + b.Property("SanaPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SanaUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficeUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficepassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.HasIndex("RepresentativeId"); + + b.ToTable("FileEmployee", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FileEmployerAgg.FileEmployer", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("EservicePassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EserviceUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FName") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("FieldOfStudy") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FullName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Gender") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IdNumber") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("InsuranceWorkshopCode") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsActive") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsLegal") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LName") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("LegalName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LevelOfEducation") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("MaritalStatus") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("MclsPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MclsUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("NationalId") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("OfficePhone") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Phone") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("RegisterId") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("RepresentativeFullName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RepresentativeId") + .HasColumnType("bigint"); + + b.Property("SanaPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SanaUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficeUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficepassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.HasIndex("RepresentativeId"); + + b.ToTable("FileEmployer", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FileState.FileState", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("FileTiming_Id") + .HasColumnType("bigint"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.HasIndex("FileTiming_Id"); + + b.ToTable("File_States", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FileTiming.FileTiming", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Deadline") + .HasColumnType("int"); + + b.Property("Tips") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.ToTable("File_Timings", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FileTitle.FileTitle", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.ToTable("File_Titles", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FinancialStatmentAgg.FinancialStatment", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractingPartyId") + .HasColumnType("bigint"); + + b.Property("ContractingPartyName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.ToTable("FinancialStatments", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FinancialTransactionAgg.FinancialTransaction", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Balance") + .HasColumnType("float"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Creditor") + .HasColumnType("float"); + + b.Property("Deptor") + .HasColumnType("float"); + + b.Property("Description") + .HasMaxLength(600) + .HasColumnType("nvarchar(600)"); + + b.Property("DescriptionOption") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FinancialStatementId") + .HasColumnType("bigint"); + + b.Property("MessageText") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("SentSms") + .HasColumnType("bit"); + + b.Property("SentSmsDateFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TdateFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TdateGr") + .HasColumnType("datetime2"); + + b.Property("TypeOfTransaction") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.HasIndex("FinancialStatementId"); + + b.ToTable("FinancialTransactions", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FineAgg.Fine", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Amount") + .HasColumnType("float"); + + b.Property("CreatedByAccountId") + .HasColumnType("bigint"); + + b.Property("CreatedByUserType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("FineDate") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LastModifiedByAccountId") + .HasColumnType("bigint"); + + b.Property("LastModifiedByUserType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("Fines", (string)null); + }); + + modelBuilder.Entity("Company.Domain.FineSubjectAgg.FineSubject", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Amount") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("FineSubjects", (string)null); + }); + + modelBuilder.Entity("Company.Domain.GroupPlanAgg.GroupPlan", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AnnualSalary") + .HasColumnType("float"); + + b.Property("BaseSalary") + .HasColumnType("float"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("GroupNo") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("JobSalary") + .HasColumnType("float"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopPlanId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("WorkshopPlanId"); + + b.ToTable("GroupPlans", (string)null); + }); + + modelBuilder.Entity("Company.Domain.GroupPlanJobItemAgg.GroupPlanJobItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("GroupNo") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("GroupPlanId") + .HasColumnType("bigint"); + + b.Property("JobId") + .HasColumnType("bigint"); + + b.Property("JobName") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopPlanId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("GroupPlanId"); + + b.ToTable("GroupPlanJobItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.HolidayAgg.Holiday", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b.HasKey("id"); + + b.ToTable("Holidays", (string)null); + }); + + modelBuilder.Entity("Company.Domain.HolidayItemAgg.HolidayItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("HolidayId") + .HasColumnType("bigint"); + + b.Property("HolidayYear") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b.Property("Holidaydate") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.HasIndex("HolidayId"); + + b.ToTable("Holidayitems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InstitutionContractAgg.InstitutionContract", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("City") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("ContractAmount") + .HasColumnType("float"); + + b.Property("ContractDateFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ContractDateGr") + .HasColumnType("datetime2"); + + b.Property("ContractEndFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ContractEndGr") + .HasColumnType("datetime2"); + + b.Property("ContractNo") + .HasMaxLength(40) + .HasColumnType("nvarchar(40)"); + + b.Property("ContractStartFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ContractStartGr") + .HasColumnType("datetime2"); + + b.Property("ContractingPartyId") + .HasColumnType("bigint"); + + b.Property("ContractingPartyName") + .HasMaxLength(80) + .HasColumnType("nvarchar(80)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DailyCompenseation") + .HasColumnType("float"); + + b.Property("Description") + .HasMaxLength(10000) + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeManualCount") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ExtensionNo") + .HasColumnType("int"); + + b.Property("HasValueAddedTax") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Obligation") + .HasColumnType("float"); + + b.Property("OfficialCompany") + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.Property("RepresentativeId") + .HasColumnType("bigint"); + + b.Property("RepresentativeName") + .HasMaxLength(80) + .HasColumnType("nvarchar(80)"); + + b.Property("Signature") + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("State") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TotalAmount") + .HasColumnType("float"); + + b.Property("TypeOfContract") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("ValueAddedTax") + .HasColumnType("float"); + + b.Property("WorkshopManualCount") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.HasKey("id"); + + b.ToTable("InstitutionContracts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InstitutionContractContactInfoAgg.InstitutionContractContactInfo", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("FnameLname") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InstitutionContractId") + .HasColumnType("bigint"); + + b.Property("PhoneNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("PhoneType") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Position") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SendSms") + .HasColumnType("bit"); + + b.HasKey("id"); + + b.HasIndex("InstitutionContractId"); + + b.ToTable("InstitutinContractContactInfo", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InstitutionPlanAgg.InstitutionPlan", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BaseContractAmont") + .HasColumnType("float"); + + b.Property("CountPerson") + .HasColumnType("int"); + + b.Property("FinalContractAmont") + .HasColumnType("float"); + + b.Property("IncreasePercentage") + .HasColumnType("float"); + + b.HasKey("id"); + + b.ToTable("InstitutionPlan", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InstitutionPlanAgg.PlanPercentage", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractAndCheckoutInPersonPercent") + .HasColumnType("int"); + + b.Property("ContractAndCheckoutPercent") + .HasColumnType("int"); + + b.Property("CustomizeCheckoutPercent") + .HasColumnType("int"); + + b.Property("InsuranceInPersonPercent") + .HasColumnType("int"); + + b.Property("InsurancePercent") + .HasColumnType("int"); + + b.Property("RollCallPercent") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("PlanPercentage", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsurancJobAgg.InsuranceJob", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EconomicCode") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("InsuranceJobTitle") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b.Property("YearlySalaryId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("InsuranceJobs", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsurancWorkshopInfoAgg.InsuranceWorkshopInfo", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("AgreementNumber") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployerName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InsuranceCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ListNumber") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.HasIndex("WorkshopId") + .IsUnique(); + + b.ToTable("InsuranceWorkshopInformation", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsuranceAgg.Insurance", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployerStr") + .HasColumnType("nvarchar(max)"); + + b.Property("ListNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Month") + .HasMaxLength(2) + .HasColumnType("int"); + + b.Property("WorkShopId") + .HasColumnType("bigint"); + + b.Property("WorkShopStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("int"); + + b.HasKey("id"); + + b.HasIndex("WorkShopId"); + + b.ToTable("Insurances", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsuranceEmployeeInfoAgg.InsuranceEmployeeInfo", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("DateOfIssue") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("FName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FatherName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Gender") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IdNumber") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("InsuranceCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("LName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("PlaceOfIssue") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId") + .IsUnique(); + + b.ToTable("InsuranceEmployeeInformation", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsuranceJobAndJobsAgg.InsuranceJobAndJobs", b => + { + b.Property("JobId") + .HasColumnType("bigint"); + + b.Property("InsuranceJobItemId") + .HasColumnType("bigint"); + + b.HasKey("JobId", "InsuranceJobItemId"); + + b.HasIndex("InsuranceJobItemId"); + + b.ToTable("InsuranceJobAndJobs", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsuranceJobItemAgg.InsuranceJobItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("InsuranceJobId") + .HasColumnType("bigint"); + + b.Property("PercentageLessThan") + .HasColumnType("float"); + + b.Property("PercentageMoreThan") + .HasColumnType("float"); + + b.Property("SalaeyLessThan") + .HasColumnType("float"); + + b.Property("SalaryMoreThan") + .HasColumnType("float"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.HasIndex("InsuranceJobId"); + + b.ToTable("InsuranceJobItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsuranceListAgg.InsuranceList", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ConfirmSentlist") + .HasColumnType("bit"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DifficultJobsInsuranc") + .HasColumnType("float"); + + b.Property("EmployerShare") + .HasColumnType("float"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("Included") + .HasColumnType("float"); + + b.Property("IncludedAndNotIncluded") + .HasColumnType("float"); + + b.Property("InsuredShare") + .HasColumnType("float"); + + b.Property("Month") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("SumOfBaseYears") + .HasColumnType("float"); + + b.Property("SumOfBenefitsIncluded") + .HasColumnType("float"); + + b.Property("SumOfDailyWage") + .HasColumnType("float"); + + b.Property("SumOfDailyWagePlusBaseYears") + .HasColumnType("float"); + + b.Property("SumOfEmployees") + .HasColumnType("int"); + + b.Property("SumOfMarriedAllowance") + .HasColumnType("float"); + + b.Property("SumOfSalaries") + .HasColumnType("float"); + + b.Property("SumOfWorkingDays") + .HasColumnType("int"); + + b.Property("UnEmploymentInsurance") + .HasColumnType("float"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b.ComplexProperty>("Debt", "Company.Domain.InsuranceListAgg.InsuranceList.Debt#InsuranceListDebt", b1 => + { + b1.IsRequired(); + + b1.Property("Amount") + .HasColumnType("float"); + + b1.Property("DebtDate") + .HasColumnType("datetime2"); + + b1.Property("MediaId") + .HasColumnType("bigint"); + + b1.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + }); + + b.ComplexProperty>("EmployerApproval", "Company.Domain.InsuranceListAgg.InsuranceList.EmployerApproval#InsuranceListEmployerApproval", b1 => + { + b1.IsRequired(); + + b1.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b1.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + }); + + b.ComplexProperty>("Inspection", "Company.Domain.InsuranceListAgg.InsuranceList.Inspection#InsuranceListInspection", b1 => + { + b1.IsRequired(); + + b1.Property("LastInspectionDateTime") + .HasColumnType("datetime2"); + + b1.Property("MediaId") + .HasColumnType("bigint"); + + b1.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + }); + + b.HasKey("id"); + + b.ToTable("InsuranceLists", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsuranceWorkshopAgg.InsuranceListWorkshop", b => + { + b.Property("InsurancListId") + .HasColumnType("bigint"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("InsurancListId", "WorkshopId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("InsuranceListWorkshops", (string)null); + }); + + modelBuilder.Entity("Company.Domain.InsuranceYearlySalaryAgg.InsuranceYearlySalary", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("Group1") + .HasColumnType("float"); + + b.Property("Group10") + .HasColumnType("float"); + + b.Property("Group11") + .HasColumnType("float"); + + b.Property("Group12") + .HasColumnType("float"); + + b.Property("Group13") + .HasColumnType("float"); + + b.Property("Group14") + .HasColumnType("float"); + + b.Property("Group15") + .HasColumnType("float"); + + b.Property("Group16") + .HasColumnType("float"); + + b.Property("Group17") + .HasColumnType("float"); + + b.Property("Group18") + .HasColumnType("float"); + + b.Property("Group19") + .HasColumnType("float"); + + b.Property("Group2") + .HasColumnType("float"); + + b.Property("Group20") + .HasColumnType("float"); + + b.Property("Group21") + .HasColumnType("float"); + + b.Property("Group22") + .HasColumnType("float"); + + b.Property("Group23") + .HasColumnType("float"); + + b.Property("Group24") + .HasColumnType("float"); + + b.Property("Group25") + .HasColumnType("float"); + + b.Property("Group26") + .HasColumnType("float"); + + b.Property("Group27") + .HasColumnType("float"); + + b.Property("Group28") + .HasColumnType("float"); + + b.Property("Group29") + .HasColumnType("float"); + + b.Property("Group3") + .HasColumnType("float"); + + b.Property("Group30") + .HasColumnType("float"); + + b.Property("Group4") + .HasColumnType("float"); + + b.Property("Group5") + .HasColumnType("float"); + + b.Property("Group6") + .HasColumnType("float"); + + b.Property("Group7") + .HasColumnType("float"); + + b.Property("Group8") + .HasColumnType("float"); + + b.Property("Group9") + .HasColumnType("float"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("InsuranceYearlySalaries", (string)null); + }); + + modelBuilder.Entity("Company.Domain.JobAgg.Job", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("JobCode") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("JobName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("id"); + + b.ToTable("Jobs", (string)null); + }); + + modelBuilder.Entity("Company.Domain.LeaveAgg.Leave", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Decription") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("EmployeeFullName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("EndLeave") + .HasColumnType("datetime2"); + + b.Property("HasShiftDuration") + .HasColumnType("bit"); + + b.Property("IsAccepted") + .HasColumnType("bit"); + + b.Property("LeaveHourses") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LeaveType") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("Month") + .HasColumnType("int"); + + b.Property("PaidLeaveType") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("ShiftDuration") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("StartLeave") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("Leave", (string)null); + }); + + modelBuilder.Entity("Company.Domain.LeftWorkAgg.LeftWork", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AddBonusesPay") + .HasColumnType("bit"); + + b.Property("AddLeavePay") + .HasColumnType("bit"); + + b.Property("AddYearsPay") + .HasColumnType("bit"); + + b.Property("BonusesOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ComputeOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeFullName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("IncludeStatus") + .HasColumnType("bit"); + + b.Property("JobId") + .HasColumnType("bigint"); + + b.Property("LeftWorkDate") + .HasColumnType("datetime2"); + + b.Property("StartWorkDate") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("LeftWork", (string)null); + }); + + modelBuilder.Entity("Company.Domain.LeftWorkInsuranceAgg.LeftWorkInsurance", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeFullName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("IncludeStatus") + .HasColumnType("bit"); + + b.Property("JobId") + .HasColumnType("bigint"); + + b.Property("LeftWorkDate") + .HasColumnType("datetime2(7)"); + + b.Property("StartWorkDate") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("LeftWorkInsurances", (string)null); + }); + + modelBuilder.Entity("Company.Domain.LeftWorkTempAgg.LeftWorkTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("JobId") + .HasColumnType("bigint"); + + b.Property("LastDayStanding") + .HasColumnType("datetime2"); + + b.Property("LeftWork") + .HasColumnType("datetime2"); + + b.Property("LeftWorkId") + .HasColumnType("bigint"); + + b.Property("LeftWorkType") + .HasColumnType("int"); + + b.Property("StartWork") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("LeftWorkTemps"); + }); + + modelBuilder.Entity("Company.Domain.LoanAgg.Entities.Loan", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Amount") + .HasColumnType("float"); + + b.Property("AmountPerMonth") + .HasColumnType("float"); + + b.Property("Count") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("CreatedByAccountId") + .HasColumnType("bigint"); + + b.Property("CreatedByUserType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("GetRounded") + .HasColumnType("bit"); + + b.Property("LoanGrantDate") + .HasColumnType("datetime2"); + + b.Property("StartInstallmentPayment") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("Loan", (string)null); + }); + + modelBuilder.Entity("Company.Domain.MandatoryHoursAgg.MandatoryHours", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Aban") + .HasColumnType("float"); + + b.Property("AbanFridays") + .HasColumnType("int"); + + b.Property("AbanHolidays") + .HasColumnType("int"); + + b.Property("AbanMonadatoryDays") + .HasColumnType("int"); + + b.Property("Azar") + .HasColumnType("float"); + + b.Property("AzarFridays") + .HasColumnType("int"); + + b.Property("AzarHolidays") + .HasColumnType("int"); + + b.Property("AzarMonadatoryDays") + .HasColumnType("int"); + + b.Property("Bahman") + .HasColumnType("float"); + + b.Property("BahmanFridays") + .HasColumnType("int"); + + b.Property("BahmanHolidays") + .HasColumnType("int"); + + b.Property("BahmanMonadatoryDays") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Dey") + .HasColumnType("float"); + + b.Property("DeyFridays") + .HasColumnType("int"); + + b.Property("DeyHolidays") + .HasColumnType("int"); + + b.Property("DeyMonadatoryDays") + .HasColumnType("int"); + + b.Property("Esfand") + .HasColumnType("float"); + + b.Property("EsfandFridays") + .HasColumnType("int"); + + b.Property("EsfandHolidays") + .HasColumnType("int"); + + b.Property("EsfandMonadatoryDays") + .HasColumnType("int"); + + b.Property("Farvardin") + .HasColumnType("float"); + + b.Property("FarvardinFridays") + .HasColumnType("int"); + + b.Property("FarvardinHolidays") + .HasColumnType("int"); + + b.Property("FarvardinMonadatoryDays") + .HasColumnType("int"); + + b.Property("Khordad") + .HasColumnType("float"); + + b.Property("KhordadFridays") + .HasColumnType("int"); + + b.Property("KhordadHolidays") + .HasColumnType("int"); + + b.Property("KhordadMonadatoryDays") + .HasColumnType("int"); + + b.Property("Mehr") + .HasColumnType("float"); + + b.Property("MehrFridays") + .HasColumnType("int"); + + b.Property("MehrHolidays") + .HasColumnType("int"); + + b.Property("MehrMonadatoryDays") + .HasColumnType("int"); + + b.Property("Mordad") + .HasColumnType("float"); + + b.Property("MordadFridays") + .HasColumnType("int"); + + b.Property("MordadHolidays") + .HasColumnType("int"); + + b.Property("MordadMonadatoryDays") + .HasColumnType("int"); + + b.Property("Ordibehesht") + .HasColumnType("float"); + + b.Property("OrdibeheshtFridays") + .HasColumnType("int"); + + b.Property("OrdibeheshtHolidays") + .HasColumnType("int"); + + b.Property("OrdibeheshtMonadatoryDays") + .HasColumnType("int"); + + b.Property("Shahrivar") + .HasColumnType("float"); + + b.Property("ShahrivarFridays") + .HasColumnType("int"); + + b.Property("ShahrivarHolidays") + .HasColumnType("int"); + + b.Property("ShahrivarMonadatoryDays") + .HasColumnType("int"); + + b.Property("Tir") + .HasColumnType("float"); + + b.Property("TirFridays") + .HasColumnType("int"); + + b.Property("TirHolidays") + .HasColumnType("int"); + + b.Property("TirMonadatoryDays") + .HasColumnType("int"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("MandatoryHours", (string)null); + }); + + modelBuilder.Entity("Company.Domain.MasterPenaltyTitle.MasterPenaltyTitle", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Day") + .HasColumnType("nvarchar(max)"); + + b.Property("FromDate") + .HasColumnType("datetime2"); + + b.Property("MasterPetition_Id") + .HasColumnType("bigint"); + + b.Property("PaidAmount") + .HasColumnType("nvarchar(max)"); + + b.Property("RemainingAmount") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("ToDate") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.HasIndex("MasterPetition_Id"); + + b.ToTable("Master_PenaltyTitles", (string)null); + }); + + modelBuilder.Entity("Company.Domain.MasterPetition.MasterPetition", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BoardType_Id") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("File_Id") + .HasColumnType("bigint"); + + b.Property("MasterName") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkHistoryDescreption") + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.HasIndex("BoardType_Id"); + + b.HasIndex("File_Id"); + + b.ToTable("Master_Petitions", (string)null); + }); + + modelBuilder.Entity("Company.Domain.MasterWorkHistory.MasterWorkHistory", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("FromDate") + .HasColumnType("datetime2"); + + b.Property("MasterPetition_Id") + .HasColumnType("bigint"); + + b.Property("ToDate") + .HasColumnType("datetime2"); + + b.Property("WorkingHoursPerDay") + .HasColumnType("int"); + + b.Property("WorkingHoursPerWeek") + .HasColumnType("int"); + + b.HasKey("id"); + + b.HasIndex("MasterPetition_Id"); + + b.ToTable("Master_WorkHistories", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ModuleAgg.EntityModule", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveString") + .HasColumnType("nvarchar(max)"); + + b.Property("NameSubModule") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.ToTable("TextManager_Module", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ModuleTextManagerAgg.EntityModuleTextManager", b => + { + b.Property("TextManagerId") + .HasColumnType("bigint"); + + b.Property("ModuleId") + .HasColumnType("bigint"); + + b.HasKey("TextManagerId", "ModuleId"); + + b.HasIndex("ModuleId"); + + b.ToTable("TextManager_ModuleTextManager", (string)null); + }); + + modelBuilder.Entity("Company.Domain.OriginalTitleAgg.EntityOriginalTitle", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveString") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); + + b.HasKey("id"); + + b.ToTable("TextManager_OriginalTitle", (string)null); + }); + + modelBuilder.Entity("Company.Domain.PaymentToEmployeeAgg.PaymentToEmployee", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("Month") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b.HasKey("id"); + + b.ToTable("PaymentToEmployees", (string)null); + }); + + modelBuilder.Entity("Company.Domain.PaymentToEmployeeItemAgg.PaymentToEmployeeItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BankCheckNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CashDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DestinationBankAccountNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DestinationBankName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("PayDate") + .HasColumnType("datetime2"); + + b.Property("Payment") + .HasColumnType("float"); + + b.Property("PaymentMetod") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("PaymentTitle") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("PaymentToEmployeeId") + .HasColumnType("bigint"); + + b.Property("SourceBankAccountNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBankName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TypeDestinationBankNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TypeSourceBankNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("PaymentToEmployeeId"); + + b.ToTable("PaymentToEmployeeItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.PenaltyTitle.PenaltyTitle", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Day") + .HasColumnType("nvarchar(max)"); + + b.Property("FromDate") + .HasColumnType("datetime2(7)"); + + b.Property("PaidAmount") + .HasColumnType("nvarchar(max)"); + + b.Property("Petition_Id") + .HasColumnType("bigint"); + + b.Property("RemainingAmount") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("ToDate") + .HasColumnType("datetime2(7)"); + + b.HasKey("id"); + + b.HasIndex("Petition_Id"); + + b.ToTable("PenaltyTitles", (string)null); + }); + + modelBuilder.Entity("Company.Domain.PercentageAgg.Percentage", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Percent") + .HasColumnType("float"); + + b.HasKey("id"); + + b.ToTable("Percentages", (string)null); + }); + + modelBuilder.Entity("Company.Domain.PersonnelCodeAgg.PersonnelCodeDomain", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("PersonnelCode") + .HasColumnType("bigint"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("PersonnelCodes", (string)null); + }); + + modelBuilder.Entity("Company.Domain.Petition.Petition", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BoardType_Id") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("File_Id") + .HasColumnType("bigint"); + + b.Property("NotificationPetitionDate") + .HasColumnType("datetime2"); + + b.Property("PetitionIssuanceDate") + .HasColumnType("datetime2"); + + b.Property("PetitionNo") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalPenalty") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalPenaltyTitles") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkHistoryDescreption") + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.HasIndex("BoardType_Id"); + + b.HasIndex("File_Id"); + + b.ToTable("Petitions", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ProceedingSession.ProceedingSession", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Board_Id") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Time") + .HasColumnType("nvarchar(max)"); + + b.HasKey("id"); + + b.HasIndex("Board_Id"); + + b.ToTable("ProceedingSessions", (string)null); + }); + + modelBuilder.Entity("Company.Domain.RepresentativeAgg.Representative", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AgentPhone") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("FName") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("FullName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IdNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsActive") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsLegal") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LName") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("LegalName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("NationalId") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Nationalcode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Phone") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("RegisterId") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.HasKey("id"); + + b.ToTable("Representative", (string)null); + }); + + modelBuilder.Entity("Company.Domain.RewardAgg.Reward", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Amount") + .HasColumnType("float"); + + b.Property("CreatedByAccountId") + .HasColumnType("bigint"); + + b.Property("CreatedByUserType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("ntext"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("GrantDate") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LastModifiedByAccountId") + .HasColumnType("bigint"); + + b.Property("LastModifiedByUserType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RewardType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("Rewards", (string)null); + }); + + modelBuilder.Entity("Company.Domain.RollCallAgg.RollCall", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BreakTimeSpan") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EarlyEntryDuration") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("EarlyExitDuration") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("EmployeeFullName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FridayWorkTimeSpan") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LateEntryDuration") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("LateExitDuration") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Month") + .HasColumnType("int"); + + b.Property("NightWorkTimeSpan") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("RollCallModifyType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShiftDate") + .HasColumnType("datetime2"); + + b.Property("ShiftDurationTimeSpan") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("ShiftType") + .IsRequired() + .HasMaxLength(22) + .HasColumnType("nvarchar(22)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("RollCall", (string)null); + }); + + modelBuilder.Entity("Company.Domain.RollCallEmployeeAgg.RollCallEmployee", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("EmployeeFullName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("FName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("HasChangedName") + .HasColumnType("bit"); + + b.Property("HasUploadedImage") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("RollCallEmployees", (string)null); + }); + + modelBuilder.Entity("Company.Domain.RollCallEmployeeStatusAgg.RollCallEmployeeStatus", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("RollCallEmployeeId") + .HasColumnType("bigint"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.HasIndex("RollCallEmployeeId"); + + b.ToTable("RollCallEmployeesStatus"); + }); + + modelBuilder.Entity("Company.Domain.RollCallPlanAgg.RollCallPlan", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BaseAmont") + .HasColumnType("float"); + + b.Property("FinalAmont") + .HasColumnType("float"); + + b.Property("IncreasePercentage") + .HasColumnType("float"); + + b.Property("MaxPersonValid") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("RollCallPlans", (string)null); + }); + + modelBuilder.Entity("Company.Domain.RollCallServiceAgg.RollCallService", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("Amount") + .HasColumnType("float"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CustomizeCheckoutAmount") + .HasColumnType("float"); + + b.Property("CustomizeCheckoutServiceEnd") + .HasColumnType("datetime2"); + + b.Property("CustomizeCheckoutServiceStart") + .HasColumnType("datetime2"); + + b.Property("Duration") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("EndService") + .HasColumnType("datetime2"); + + b.Property("HasCustomizeCheckoutService") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("MaxPersonValid") + .HasColumnType("int"); + + b.Property("ServiceType") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("StartService") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("WorkshopId"); + + b.ToTable("RollCallServices", (string)null); + }); + + modelBuilder.Entity("Company.Domain.SalaryAidAgg.SalaryAid", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Amount") + .HasColumnType("float"); + + b.Property("CalculationDate") + .HasColumnType("datetime2"); + + b.Property("CalculationMonth") + .HasColumnType("int"); + + b.Property("CalculationYear") + .HasColumnType("int"); + + b.Property("CreatedByAccountId") + .HasColumnType("bigint"); + + b.Property("CreatedByUserType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("LastModifiedByAccountId") + .HasColumnType("bigint"); + + b.Property("LastModifiedByUserType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SalaryAidDateTime") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("SalaryAids", (string)null); + }); + + modelBuilder.Entity("Company.Domain.SmsResultAgg.SmsResult", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractingPartyName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContractingPatyId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("InstitutionContractId") + .HasColumnType("bigint"); + + b.Property("MessageId") + .HasColumnType("int"); + + b.Property("Mobile") + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.Property("Status") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("TypeOfSms") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.ToTable("SmsResults", (string)null); + }); + + modelBuilder.Entity("Company.Domain.SubtitleAgg.EntitySubtitle", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EntitySubtitleid") + .HasColumnType("bigint"); + + b.Property("IsActiveString") + .HasColumnType("nvarchar(max)"); + + b.Property("OriginalTitle_Id") + .HasColumnType("bigint"); + + b.Property("Subtitle") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); + + b.HasKey("id"); + + b.HasIndex("EntitySubtitleid"); + + b.HasIndex("OriginalTitle_Id"); + + b.ToTable("TextManager_Subtitle", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TaxJobCategoryAgg.TaxJobCategory", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("JobCategoryCode") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("JobCategoryName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.ToTable("TaxJobCategory", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BudgetLawExceptions") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("Country") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CurrencyType") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("EmployeeName") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("EmploymentLocationStatus") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("ExchangeRate") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("InsuranceBranch") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InsuranceName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("JobCategoryCode") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("JobCategoryId") + .HasColumnType("bigint"); + + b.Property("JobTitle") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("PaymentType") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("RetirementDate") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TaxExempt") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("TypeOfEmployment") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("TypeOfInsurance") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopName") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.HasKey("id"); + + b.HasIndex("WorkshopId"); + + b.ToTable("TaxLeftWorkCategory", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TaxLeftWorkItemAgg.TaxLeftWorkItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("LeftWork") + .HasColumnType("datetime2"); + + b.Property("StartWork") + .HasColumnType("datetime2"); + + b.Property("TaxLeftWorkCategoryId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TaxLeftWorkCategoryId"); + + b.ToTable("TaxLeftWorkItem", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TemporaryClientRegistrationAgg.ContractingPartyTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("City") + .HasMaxLength(35) + .HasColumnType("nvarchar(35)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("FName") + .IsRequired() + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("FatherName") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("Gender") + .IsRequired() + .HasMaxLength(6) + .HasColumnType("nvarchar(6)"); + + b.Property("IdNumber") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IdNumberSeri") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IdNumberSerial") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("LName") + .IsRequired() + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("NationalCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Phone") + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.Property("State") + .HasMaxLength(35) + .HasColumnType("nvarchar(35)"); + + b.HasKey("id"); + + b.ToTable("ContractingPartyTemp", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TemporaryClientRegistrationAgg.InstitutionContractTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractEndGr") + .HasColumnType("datetime2"); + + b.Property("ContractStartGr") + .HasColumnType("datetime2"); + + b.Property("ContractingPartyTempId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("MessageId") + .HasColumnType("int"); + + b.Property("OfficialCompany") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("PaymentModel") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("PeriodModel") + .HasMaxLength(3) + .HasColumnType("nvarchar(3)"); + + b.Property("RegistrationStatus") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("SendVerifyCodeTime") + .HasColumnType("datetime2"); + + b.Property("TotalPayment") + .HasColumnType("float"); + + b.Property("ValueAddedTax") + .HasColumnType("float"); + + b.Property("VerifyCode") + .HasMaxLength(6) + .HasColumnType("nvarchar(6)"); + + b.Property("VerifyCodeEndTime") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.ToTable("InstitutionContractTemps", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TemporaryClientRegistrationAgg.WorkshopServicesTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CountPerson") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ServiceName") + .HasMaxLength(40) + .HasColumnType("nvarchar(40)"); + + b.Property("WorkshopTempId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("WorkshopTempId"); + + b.ToTable("WorkshopServicesTemps", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TemporaryClientRegistrationAgg.WorkshopTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractingPartyTempId") + .HasColumnType("bigint"); + + b.Property("CountPerson") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("WorkshopName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopServicesAmount") + .HasColumnType("float"); + + b.HasKey("id"); + + b.ToTable("WorkshopTemps", (string)null); + }); + + modelBuilder.Entity("Company.Domain.TextManagerAgg.EntityTextManager", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Chapter_Id") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateTextManager") + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActiveString") + .HasColumnType("nvarchar(max)"); + + b.Property("NoteNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("NumberTextManager") + .HasColumnType("nvarchar(max)"); + + b.Property("OriginalTitle_Id") + .HasColumnType("bigint"); + + b.Property("Paragraph") + .HasColumnType("nvarchar(max)"); + + b.Property("SubjectTextManager") + .HasColumnType("nvarchar(max)"); + + b.Property("Subtitle_Id") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("TextManager_TextManager", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkHistory.WorkHistory", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("FromDate") + .HasColumnType("datetime2"); + + b.Property("Petition_Id") + .HasColumnType("bigint"); + + b.Property("ToDate") + .HasColumnType("datetime2"); + + b.Property("WorkingHoursPerDay") + .HasColumnType("int"); + + b.Property("WorkingHoursPerWeek") + .HasColumnType("int"); + + b.HasKey("id"); + + b.HasIndex("Petition_Id"); + + b.ToTable("WorkHistories", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursAgg.WorkingHours", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractId") + .HasColumnType("bigint"); + + b.Property("ContractNo") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("NumberOfFriday") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("NumberOfWorkingDays") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("OverNightWorkH") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("OverNightWorkM") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("OverTimeWorkH") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("OverTimeWorkM") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("ShiftWork") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("TotalHoursesH") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("TotalHoursesM") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("WeeklyWorkingTime") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.HasIndex("ContractId"); + + b.ToTable("WorkingHours", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursItemsAgg.WorkingHoursItems", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ComplexEnd") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("ComplexStart") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DayOfWork") + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("End1") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("End2") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("End3") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("RestTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Start1") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Start2") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Start3") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("WeekNumber") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("WorkingHoursId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("WorkingHoursId"); + + b.ToTable("WorkingHoursItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursTempAgg.WorkingHoursTemp", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("ShiftWork") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("WorkShopAddress2") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("WorkingHoursTemp", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursTempItemAgg.WorkingHoursTempItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ComplexEnd") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("ComplexStart") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DayOfWork") + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.Property("End1") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("End2") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("RestTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Start1") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Start2") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("WeekNumber") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("WorkingHoursTempId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("WorkingHoursTempId"); + + b.ToTable("WorkingHoursTempItem", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkshopAccountAgg.WorkshopAccount", b => + { + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("ContractAndCheckout") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Insurance") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsActiveSting") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Tax") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.HasKey("WorkshopId", "AccountId"); + + b.ToTable("WorkshopeAccounts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkshopAgg.Workshop", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AddBonusesPay") + .HasColumnType("bit"); + + b.Property("AddLeavePay") + .HasColumnType("bit"); + + b.Property("AddYearsPay") + .HasColumnType("bit"); + + b.Property("Address") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("AgentName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("AgentPhone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AgreementNumber") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ArchiveCode") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("BonusesOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("City") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ComputeOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContractTerm") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("FixedSalary") + .HasColumnType("bit"); + + b.Property("HasRollCallFreeVip") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("InsuranceCheckoutFamilyAllowance") + .HasColumnType("bit"); + + b.Property("InsuranceCheckoutOvertime") + .HasColumnType("bit"); + + b.Property("InsuranceCode") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InsuranceJobId") + .HasColumnType("bigint"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsActiveString") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IsClassified") + .HasColumnType("bit"); + + b.Property("IsOldContract") + .HasColumnType("bit"); + + b.Property("Population") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("State") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TotalPaymentHide") + .HasColumnType("bit"); + + b.Property("TypeOfContract") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TypeOfInsuranceSend") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TypeOfOwnership") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("WorkshopFullName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopHolidayWorking") + .HasColumnType("bit"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("WorkshopSureName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("YearsOptions") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ZoneName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.ToTable("Workshops", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkshopEmployerAgg.WorkshopEmployer", b => + { + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("EmployerId") + .HasColumnType("bigint"); + + b.HasKey("WorkshopId", "EmployerId"); + + b.HasIndex("EmployerId"); + + b.ToTable("WorkshopeEmployers", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkshopPlanAgg.WorkshopPlan", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Designer") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("DesignerPhone") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("ExecutionDateFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ExecutionDateGr") + .HasColumnType("datetime2"); + + b.Property("IncludingDateFa") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IncludingDateGr") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("WorkshopPlan", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkshopPlanEmployeeAgg.WorkshopPlanEmployee", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EmployeeFullName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopPlanId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("WorkshopPlanId"); + + b.ToTable("WorkshopPlanEmployees", (string)null); + }); + + modelBuilder.Entity("Company.Domain.WorkshopSubAccountAgg.WorkshopSubAccount", b => + { + b.Property("SubAccountId") + .HasColumnType("bigint"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("IsActive") + .HasMaxLength(5) + .HasColumnType("int"); + + b.HasKey("SubAccountId", "WorkshopId"); + + b.HasIndex("WorkshopId"); + + b.ToTable("WorkshopSubAccounts", (string)null); + }); + + modelBuilder.Entity("Company.Domain.YearlySalaryAgg.YearlySalary", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ConnectionId") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Year") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.ToTable("YearlySalariess", (string)null); + }); + + modelBuilder.Entity("Company.Domain.YearlySalaryItemsAgg.YearlySalaryItem", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ItemName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ItemValue") + .HasColumnType("float"); + + b.Property("ParentConnectionId") + .HasColumnType("int"); + + b.Property("ValueType") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("YearlySalaryId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("YearlySalaryId"); + + b.ToTable("YearlyItems", (string)null); + }); + + modelBuilder.Entity("Company.Domain.YearlysSalaryTitleAgg.YearlySalaryTitle", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Title1") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title10") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title2") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title3") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title4") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title5") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title6") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title7") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title8") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title9") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("id"); + + b.ToTable("YearlySalaryTitles", (string)null); + }); + + modelBuilder.Entity("Company.Domain.ZoneAgg.Zone", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CityId") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ZoneName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.ToTable("Zones", (string)null); + }); + + modelBuilder.Entity("Company.Domain.empolyerAgg.Employer", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Address") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("AgentPhone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContractingPartyId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("DateOfIssue") + .HasColumnType("datetime2"); + + b.Property("EmployerLName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("EmployerNo") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EservicePassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EserviceUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FatherName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FullName") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Gender") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IdNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsLegal") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("LName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("MclsPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MclsUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NationalId") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("Nationalcode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Nationality") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Phone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlaceOfIssue") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RegisterId") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("SanaPassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SanaUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficeUserName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TaxOfficepassword") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.HasIndex("ContractingPartyId"); + + b.ToTable("Employers", (string)null); + }); + + modelBuilder.Entity("EmployerWorkshop", b => + { + b.Property("EmployersListid") + .HasColumnType("bigint"); + + b.Property("WorkshopsListid") + .HasColumnType("bigint"); + + b.HasKey("EmployersListid", "WorkshopsListid"); + + b.HasIndex("WorkshopsListid"); + + b.ToTable("EmployerWorkshop"); + }); + + modelBuilder.Entity("Company.Domain.Board.Board", b => + { + b.HasOne("Company.Domain.BoardType.BoardType", "BoardType") + .WithMany("BoardsList") + .HasForeignKey("BoardType_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.File1.File1", "File1") + .WithMany("BoardsList") + .HasForeignKey("File_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BoardType"); + + b.Navigation("File1"); + }); + + modelBuilder.Entity("Company.Domain.ChapterAgg.EntityChapter", b => + { + b.HasOne("Company.Domain.SubtitleAgg.EntitySubtitle", "EntitySubtitle") + .WithMany("Chapters") + .HasForeignKey("Subtitle_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntitySubtitle"); + }); + + modelBuilder.Entity("Company.Domain.CheckoutAgg.Checkout", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("Checkouts") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.ClientEmployeeWorkshopAgg.ClientEmployeeWorkshop", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("ClientEmployeeWorkshopList") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("ClientEmployeeWorkshopList") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b => + { + b.HasOne("Company.Domain.RepresentativeAgg.Representative", "Representative") + .WithMany("ContractingParties") + .HasForeignKey("RepresentativeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Representative"); + }); + + modelBuilder.Entity("Company.Domain.ContractAgg.Contract", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("Contracts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.empolyerAgg.Employer", "Employer") + .WithMany("Contracts") + .HasForeignKey("EmployerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.JobAgg.Job", "Job") + .WithMany("ContractsList") + .HasForeignKey("JobTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.MandatoryHoursAgg.MandatoryHours", null) + .WithMany("Contracts") + .HasForeignKey("MandatoryHoursid"); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("Contracts2") + .HasForeignKey("WorkshopIds") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.HasOne("Company.Domain.YearlySalaryAgg.YearlySalary", "YearlySalary") + .WithMany("Contracts") + .HasForeignKey("YearlySalaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Employer"); + + b.Navigation("Job"); + + b.Navigation("Workshop"); + + b.Navigation("YearlySalary"); + }); + + modelBuilder.Entity("Company.Domain.ContractingPartyAccountAgg.ContractingPartyAccount", b => + { + b.HasOne("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", "PersonalContractingParty") + .WithMany() + .HasForeignKey("PersonalContractingPartyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PersonalContractingParty"); + }); + + modelBuilder.Entity("Company.Domain.CrossJobAgg.CrossJob", b => + { + b.HasOne("Company.Domain.CrossJobGuildAgg.CrossJobGuild", "CrossJobGuild") + .WithMany("CrossJobList") + .HasForeignKey("CrossJobGuildId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CrossJobGuild"); + }); + + modelBuilder.Entity("Company.Domain.CrossJobItemsAgg.CrossJobItems", b => + { + b.HasOne("Company.Domain.CrossJobAgg.CrossJob", "CrossJob") + .WithMany("CrossJobItemsList") + .HasForeignKey("CrossJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.JobAgg.Job", "Job") + .WithMany("CrossJobItemsList") + .HasForeignKey("JobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CrossJob"); + + b.Navigation("Job"); + }); + + modelBuilder.Entity("Company.Domain.CustomizeCheckoutAgg.CustomizeCheckout", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("CustomizeCheckouts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("CustomizeCheckouts") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.CustomizeRotatingShift", "CustomizeRotatingShifts", b1 => + { + b1.Property("CustomizeCheckoutid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("CustomizeCheckoutid", "Id"); + + b1.ToTable("CustomizeCheckouts_CustomizeRotatingShifts"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.IrregularShift", "IrregularShift", b1 => + { + b1.Property("CustomizeCheckoutid") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.Property("WorkshopIrregularShifts") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b1.HasKey("CustomizeCheckoutid"); + + b1.ToTable("CustomizeCheckouts"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutRegularShift", "RegularShifts", b1 => + { + b1.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("id")); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("CustomizeCheckoutid") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("Placement") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("id"); + + b1.HasIndex("CustomizeCheckoutid"); + + b1.ToTable("CustomizeCheckouts_RegularShifts"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutFine", "CheckoutFines", b1 => + { + b1.Property("CustomizeCheckoutid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("Amount") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("FineDateFa") + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b1.Property("FineDateGr") + .HasColumnType("datetime2"); + + b1.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b1.HasKey("CustomizeCheckoutid", "Id"); + + b1.ToTable("CustomizeCheckoutFine"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutLoanInstallments", "CustomizeCheckoutLoanInstallments", b1 => + { + b1.Property("CustomizeCheckoutid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("AmountForMonth") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("LoanAmount") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b1.Property("LoanRemaining") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("Month") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b1.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b1.HasKey("CustomizeCheckoutid", "Id"); + + b1.ToTable("CustomizeCheckoutLoanInstallments"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutReward", "CustomizeCheckoutRewards", b1 => + { + b1.Property("CustomizeCheckoutid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("Amount") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("Description") + .HasColumnType("ntext"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("GrantDate") + .HasColumnType("datetime2"); + + b1.Property("GrantDateFa") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b1.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b1.HasKey("CustomizeCheckoutid", "Id"); + + b1.ToTable("CustomizeCheckoutReward"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutSalaryAid", "CustomizeCheckoutSalaryAids", b1 => + { + b1.Property("CustomizeCheckoutid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("Amount") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("CalculationDateTime") + .HasColumnType("datetime2"); + + b1.Property("CalculationDateTimeFa") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("SalaryAidDateTime") + .HasColumnType("datetime2"); + + b1.Property("SalaryAidDateTimeFa") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b1.HasKey("CustomizeCheckoutid", "Id"); + + b1.ToTable("CustomizeCheckoutSalaryAid"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutid"); + }); + + b.Navigation("CheckoutFines"); + + b.Navigation("CustomizeCheckoutLoanInstallments"); + + b.Navigation("CustomizeCheckoutRewards"); + + b.Navigation("CustomizeCheckoutSalaryAids"); + + b.Navigation("CustomizeRotatingShifts"); + + b.Navigation("Employee"); + + b.Navigation("IrregularShift"); + + b.Navigation("RegularShifts"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.CustomizeCheckoutTempAgg.CustomizeCheckoutTemp", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany() + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.CustomizeRotatingShift", "CustomizeRotatingShifts", b1 => + { + b1.Property("CustomizeCheckoutTempid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("CustomizeCheckoutTempid", "Id"); + + b1.ToTable("CustomizeCheckoutTemps_CustomizeRotatingShifts"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutTempid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.IrregularShift", "IrregularShift", b1 => + { + b1.Property("CustomizeCheckoutTempid") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.Property("WorkshopIrregularShifts") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b1.HasKey("CustomizeCheckoutTempid"); + + b1.ToTable("CustomizeCheckoutTemps"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutTempid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutRegularShift", "RegularShifts", b1 => + { + b1.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("id")); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("CustomizeCheckoutTempid") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("Placement") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("id"); + + b1.HasIndex("CustomizeCheckoutTempid"); + + b1.ToTable("CustomizeCheckoutTemps_RegularShifts"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutTempid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempFine", "CheckoutFines", b1 => + { + b1.Property("CustomizeCheckoutTempid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("Amount") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("FineDateFa") + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b1.Property("FineDateGr") + .HasColumnType("datetime2"); + + b1.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b1.HasKey("CustomizeCheckoutTempid", "Id"); + + b1.ToTable("CustomizeCheckoutTempFine"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutTempid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempLoanInstallments", "CustomizeCheckoutLoanInstallments", b1 => + { + b1.Property("CustomizeCheckoutTempid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("AmountForMonth") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("LoanAmount") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b1.Property("LoanRemaining") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("Month") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b1.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b1.HasKey("CustomizeCheckoutTempid", "Id"); + + b1.ToTable("CustomizeCheckoutTempLoanInstallments"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutTempid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempReward", "CustomizeCheckoutRewards", b1 => + { + b1.Property("CustomizeCheckoutTempid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("Amount") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("Description") + .HasColumnType("ntext"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("GrantDate") + .HasColumnType("datetime2"); + + b1.Property("GrantDateFa") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b1.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b1.HasKey("CustomizeCheckoutTempid", "Id"); + + b1.ToTable("CustomizeCheckoutTempReward"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutTempid"); + }); + + b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempSalaryAid", "CustomizeCheckoutSalaryAids", b1 => + { + b1.Property("CustomizeCheckoutTempid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("Amount") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("CalculationDateTime") + .HasColumnType("datetime2"); + + b1.Property("CalculationDateTimeFa") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b1.Property("EntityId") + .HasColumnType("bigint"); + + b1.Property("SalaryAidDateTime") + .HasColumnType("datetime2"); + + b1.Property("SalaryAidDateTimeFa") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b1.HasKey("CustomizeCheckoutTempid", "Id"); + + b1.ToTable("CustomizeCheckoutTempSalaryAid"); + + b1.WithOwner() + .HasForeignKey("CustomizeCheckoutTempid"); + }); + + b.Navigation("CheckoutFines"); + + b.Navigation("CustomizeCheckoutLoanInstallments"); + + b.Navigation("CustomizeCheckoutRewards"); + + b.Navigation("CustomizeCheckoutSalaryAids"); + + b.Navigation("CustomizeRotatingShifts"); + + b.Navigation("Employee"); + + b.Navigation("IrregularShift"); + + b.Navigation("RegularShifts"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopEmployeeSettingsAgg.Entities.CustomizeWorkshopEmployeeSettings", b => + { + b.HasOne("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", "CustomizeWorkshopGroupSettings") + .WithMany("CustomizeWorkshopEmployeeSettingsCollection") + .HasForeignKey("CustomizeWorkshopGroupSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("Company.Domain.CustomizeWorkshopEmployeeSettingsAgg.Entities.CustomizeWorkshopEmployeeSettingsShift", "CustomizeWorkshopEmployeeSettingsShifts", b1 => + { + b1.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("id")); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("CustomizeWorkshopEmployeeSettingsId") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("Placement") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.Property("PreviousShiftThreshold") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("id"); + + b1.HasIndex("CustomizeWorkshopEmployeeSettingsId"); + + b1.ToTable("CustomizeWorkshopEmployeeSettingsShifts", (string)null); + + b1.WithOwner("CustomizeWorkshopEmployeeSettings") + .HasForeignKey("CustomizeWorkshopEmployeeSettingsId"); + + b1.Navigation("CustomizeWorkshopEmployeeSettings"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BaseYearsPay", "BaseYearsPay", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("BaseYearsPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BaseYearsPay_BaseYearsPayType"); + + b1.Property("PaymentType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BaseYearsPay_PaymentType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("BaseYearsPay_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BonusesPay", "BonusesPay", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("BonusesPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BonusesPay_BonusesPayType"); + + b1.Property("PaymentType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BonusesPay_PaymentType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("BonusesPay_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BreakTime", "BreakTime", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("BreakTimeType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b1.Property("BreakTimeValue") + .HasColumnType("time"); + + b1.Property("HasBreakTimeValue") + .HasColumnType("bit"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.CustomizeRotatingShift", "CustomizeRotatingShifts", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid", "Id"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings_CustomizeRotatingShifts"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.EarlyExit", "EarlyExit", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("EarlyExitType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("EarlyExit_EarlyExitType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("EarlyExitTimeFines_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.EarlyExitTimeFine", "EarlyExitTimeFines", b2 => + { + b2.Property("CustomizeWorkshopEmployeeSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("FineMoney") + .HasColumnType("float") + .HasColumnName("EarlyExitTimeFines_FineMoney"); + + b2.Property("Minute") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)") + .HasColumnName("EarlyExitTimeFines_Minute"); + + b2.HasKey("CustomizeWorkshopEmployeeSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopEmployeeSettings_EarlyExitTimeFines"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsId"); + }); + + b1.Navigation("EarlyExitTimeFines"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FamilyAllowance", "FamilyAllowance", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("FamilyAllowanceType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FamilyAllowance_FamilyAllowanceType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FamilyAllowance_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FineAbsenceDeduction", "FineAbsenceDeduction", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("FineAbsenceDeductionType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FineAbsenceDeduction_FineAbsenceDeductionType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FineAbsenceDeduction_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FineAbsenceDayOfWeek", "FineAbsenceDayOfWeekCollection", b2 => + { + b2.Property("CustomizeWorkshopEmployeeSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("DayOfWeek") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FineAbsenceDayOfWeekCollection_DayOfWeek"); + + b2.HasKey("CustomizeWorkshopEmployeeSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopEmployeeSettings_FineAbsenceDayOfWeekCollection"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsId"); + }); + + b1.Navigation("FineAbsenceDayOfWeekCollection"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FridayPay", "FridayPay", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("FridayPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FridayPay_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.InsuranceDeduction", "InsuranceDeduction", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("InsuranceDeductionType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("InsuranceDeduction_InsuranceDeductionType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("InsuranceDeduction_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.IrregularShift", "IrregularShift", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.Property("WorkshopIrregularShifts") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LateToWork", "LateToWork", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("LateToWorkType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("LateToWork_LateToWorkType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("LateToWork_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LateToWorkTimeFine", "LateToWorkTimeFines", b2 => + { + b2.Property("CustomizeWorkshopEmployeeSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("FineMoney") + .HasColumnType("float") + .HasColumnName("LateToWorkTimeFines_FineMoney"); + + b2.Property("Minute") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)") + .HasColumnName("LateToWorkTimeFines_Minute"); + + b2.HasKey("CustomizeWorkshopEmployeeSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopEmployeeSettings_LateToWorkTimeFines"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsId"); + }); + + b1.Navigation("LateToWorkTimeFines"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LeavePay", "LeavePay", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("LeavePayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("LeavePay_LeavePayType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("LeavePay_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.MarriedAllowance", "MarriedAllowance", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("MarriedAllowanceType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("MarriedAllowance_MarriedAllowanceType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("MarriedAllowance_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.NightWorkPay", "NightWorkPay", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("NightWorkingType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("NightWorkPay_NightWorkingType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("NightWorkPay_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.OverTimePay", "OverTimePay", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("OverTimePayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("OverTimePay_OverTimePayType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("OverTimePay_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.ShiftPay", "ShiftPay", b1 => + { + b1.Property("CustomizeWorkshopEmployeeSettingsid") + .HasColumnType("bigint"); + + b1.Property("ShiftPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("ShiftPay_ShiftPayType"); + + b1.Property("ShiftType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("ShiftPay_ShiftType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("ShiftPay_Value"); + + b1.HasKey("CustomizeWorkshopEmployeeSettingsid"); + + b1.ToTable("CustomizeWorkshopEmployeeSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopEmployeeSettingsid"); + }); + + b.Navigation("BaseYearsPay"); + + b.Navigation("BonusesPay"); + + b.Navigation("BreakTime"); + + b.Navigation("CustomizeRotatingShifts"); + + b.Navigation("CustomizeWorkshopEmployeeSettingsShifts"); + + b.Navigation("CustomizeWorkshopGroupSettings"); + + b.Navigation("EarlyExit"); + + b.Navigation("FamilyAllowance"); + + b.Navigation("FineAbsenceDeduction"); + + b.Navigation("FridayPay"); + + b.Navigation("InsuranceDeduction"); + + b.Navigation("IrregularShift"); + + b.Navigation("LateToWork"); + + b.Navigation("LeavePay"); + + b.Navigation("MarriedAllowance"); + + b.Navigation("NightWorkPay"); + + b.Navigation("OverTimePay"); + + b.Navigation("ShiftPay"); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", b => + { + b.HasOne("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", "CustomizeWorkshopSettings") + .WithMany("CustomizeWorkshopGroupSettingsCollection") + .HasForeignKey("CustomizeWorkshopSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettingsShift", "CustomizeWorkshopGroupSettingsShifts", b1 => + { + b1.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("id")); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("CustomizeWorkshopGroupSettingsId") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("Placement") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("id"); + + b1.HasIndex("CustomizeWorkshopGroupSettingsId"); + + b1.ToTable("CustomizeWorkshopGroupSettingsShifts", (string)null); + + b1.WithOwner("CustomizeWorkshopGroupSettings") + .HasForeignKey("CustomizeWorkshopGroupSettingsId"); + + b1.Navigation("CustomizeWorkshopGroupSettings"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BaseYearsPay", "BaseYearsPay", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("BaseYearsPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BaseYearsPay_BaseYearsPayType"); + + b1.Property("PaymentType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BaseYearsPay_PaymentType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("BaseYearsPay_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BonusesPay", "BonusesPay", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("BonusesPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BonusesPay_BonusesPayType"); + + b1.Property("PaymentType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BonusesPay_PaymentType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("BonusesPay_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BreakTime", "BreakTime", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("BreakTimeType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b1.Property("BreakTimeValue") + .HasColumnType("time"); + + b1.Property("HasBreakTimeValue") + .HasColumnType("bit"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.CustomizeRotatingShift", "CustomizeRotatingShifts", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid", "Id"); + + b1.ToTable("CustomizeWorkshopGroupSettings_CustomizeRotatingShifts"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.EarlyExit", "EarlyExit", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("EarlyExitType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("EarlyExit_EarlyExitType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("EarlyExitTimeFines_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.EarlyExitTimeFine", "EarlyExitTimeFines", b2 => + { + b2.Property("CustomizeWorkshopGroupSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("FineMoney") + .HasColumnType("float") + .HasColumnName("EarlyExitTimeFines_FineMoney"); + + b2.Property("Minute") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)") + .HasColumnName("EarlyExitTimeFines_Minute"); + + b2.HasKey("CustomizeWorkshopGroupSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopGroupSettings_EarlyExitTimeFines"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsId"); + }); + + b1.Navigation("EarlyExitTimeFines"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FamilyAllowance", "FamilyAllowance", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("FamilyAllowanceType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FamilyAllowance_FamilyAllowanceType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FamilyAllowance_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FineAbsenceDeduction", "FineAbsenceDeduction", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("FineAbsenceDeductionType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FineAbsenceDeduction_FineAbsenceDeductionType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FineAbsenceDeduction_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FineAbsenceDayOfWeek", "FineAbsenceDayOfWeekCollection", b2 => + { + b2.Property("CustomizeWorkshopGroupSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("DayOfWeek") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FineAbsenceDayOfWeekCollection_DayOfWeek"); + + b2.HasKey("CustomizeWorkshopGroupSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopGroupSettings_FineAbsenceDayOfWeekCollection"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsId"); + }); + + b1.Navigation("FineAbsenceDayOfWeekCollection"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FridayPay", "FridayPay", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("FridayPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FridayPay_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.InsuranceDeduction", "InsuranceDeduction", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("InsuranceDeductionType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("InsuranceDeduction_InsuranceDeductionType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("InsuranceDeduction_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.IrregularShift", "IrregularShift", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.Property("WorkshopIrregularShifts") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LateToWork", "LateToWork", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("LateToWorkType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("LateToWork_LateToWorkType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("LateToWork_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LateToWorkTimeFine", "LateToWorkTimeFines", b2 => + { + b2.Property("CustomizeWorkshopGroupSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("FineMoney") + .HasColumnType("float") + .HasColumnName("LateToWorkTimeFines_FineMoney"); + + b2.Property("Minute") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)") + .HasColumnName("LateToWorkTimeFines_Minute"); + + b2.HasKey("CustomizeWorkshopGroupSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopGroupSettings_LateToWorkTimeFines"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsId"); + }); + + b1.Navigation("LateToWorkTimeFines"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LeavePay", "LeavePay", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("LeavePayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("LeavePay_LeavePayType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("LeavePay_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.MarriedAllowance", "MarriedAllowance", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("MarriedAllowanceType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("MarriedAllowance_MarriedAllowanceType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("MarriedAllowance_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.NightWorkPay", "NightWorkPay", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("NightWorkingType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("NightWorkPay_NightWorkingType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("NightWorkPay_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.OverTimePay", "OverTimePay", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("OverTimePayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("OverTimePay_OverTimePayType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("OverTimePay_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.ShiftPay", "ShiftPay", b1 => + { + b1.Property("CustomizeWorkshopGroupSettingsid") + .HasColumnType("bigint"); + + b1.Property("ShiftPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("ShiftPay_ShiftPayType"); + + b1.Property("ShiftType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("ShiftPay_ShiftType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("ShiftPay_Value"); + + b1.HasKey("CustomizeWorkshopGroupSettingsid"); + + b1.ToTable("CustomizeWorkshopGroupSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopGroupSettingsid"); + }); + + b.Navigation("BaseYearsPay"); + + b.Navigation("BonusesPay"); + + b.Navigation("BreakTime"); + + b.Navigation("CustomizeRotatingShifts"); + + b.Navigation("CustomizeWorkshopGroupSettingsShifts"); + + b.Navigation("CustomizeWorkshopSettings"); + + b.Navigation("EarlyExit"); + + b.Navigation("FamilyAllowance"); + + b.Navigation("FineAbsenceDeduction"); + + b.Navigation("FridayPay"); + + b.Navigation("InsuranceDeduction"); + + b.Navigation("IrregularShift"); + + b.Navigation("LateToWork"); + + b.Navigation("LeavePay"); + + b.Navigation("MarriedAllowance"); + + b.Navigation("NightWorkPay"); + + b.Navigation("OverTimePay"); + + b.Navigation("ShiftPay"); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithOne("CustomizeWorkshopSettings") + .HasForeignKey("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", "WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettingsShift", "CustomizeWorkshopSettingsShifts", b1 => + { + b1.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("id")); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("CustomizeWorkshopSettingsId") + .HasColumnType("bigint"); + + b1.Property("EndTime") + .HasColumnType("time"); + + b1.Property("Placement") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.Property("StartTime") + .HasColumnType("time"); + + b1.HasKey("id"); + + b1.HasIndex("CustomizeWorkshopSettingsId"); + + b1.ToTable("CustomizeWorkshopSettingsShifts", (string)null); + + b1.WithOwner("CustomizeWorkshopSettings") + .HasForeignKey("CustomizeWorkshopSettingsId"); + + b1.Navigation("CustomizeWorkshopSettings"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BaseYearsPay", "BaseYearsPay", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("BaseYearsPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BaseYearsPay_BaseYearsPayType"); + + b1.Property("PaymentType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BaseYearsPay_PaymentType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("BaseYearsPay_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.BonusesPay", "BonusesPay", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("BonusesPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BonusesPay_BonusesPayType"); + + b1.Property("PaymentType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("BonusesPay_PaymentType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("BonusesPay_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.EarlyExit", "EarlyExit", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("EarlyExitType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("EarlyExit_EarlyExitType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("EarlyExitTimeFines_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.EarlyExitTimeFine", "EarlyExitTimeFines", b2 => + { + b2.Property("CustomizeWorkshopSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("FineMoney") + .HasColumnType("float") + .HasColumnName("EarlyExitTimeFines_FineMoney"); + + b2.Property("Minute") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)") + .HasColumnName("EarlyExitTimeFines_Minute"); + + b2.HasKey("CustomizeWorkshopSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopSettings_EarlyExitTimeFines"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsId"); + }); + + b1.Navigation("EarlyExitTimeFines"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FamilyAllowance", "FamilyAllowance", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("FamilyAllowanceType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FamilyAllowance_FamilyAllowanceType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FamilyAllowance_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FineAbsenceDeduction", "FineAbsenceDeduction", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("FineAbsenceDeductionType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FineAbsenceDeduction_FineAbsenceDeductionType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FineAbsenceDeduction_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FineAbsenceDayOfWeek", "FineAbsenceDayOfWeekCollection", b2 => + { + b2.Property("CustomizeWorkshopSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("DayOfWeek") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("FineAbsenceDayOfWeekCollection_DayOfWeek"); + + b2.HasKey("CustomizeWorkshopSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopSettings_FineAbsenceDayOfWeekCollection"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsId"); + }); + + b1.Navigation("FineAbsenceDayOfWeekCollection"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.FridayPay", "FridayPay", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("FridayPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("FridayPay_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.InsuranceDeduction", "InsuranceDeduction", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("InsuranceDeductionType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("InsuranceDeduction_InsuranceDeductionType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("InsuranceDeduction_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LateToWork", "LateToWork", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("LateToWorkType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("LateToWork_LateToWorkType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("LateToWork_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + + b1.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LateToWorkTimeFine", "LateToWorkTimeFines", b2 => + { + b2.Property("CustomizeWorkshopSettingsId") + .HasColumnType("bigint"); + + b2.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property("Id")); + + b2.Property("FineMoney") + .HasColumnType("float") + .HasColumnName("LateToWorkTimeFines_FineMoney"); + + b2.Property("Minute") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)") + .HasColumnName("LateToWorkTimeFines_Minute"); + + b2.HasKey("CustomizeWorkshopSettingsId", "Id"); + + b2.ToTable("CustomizeWorkshopSettings_LateToWorkTimeFines"); + + b2.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsId"); + }); + + b1.Navigation("LateToWorkTimeFines"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.LeavePay", "LeavePay", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("LeavePayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("LeavePay_LeavePayType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("LeavePay_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.MarriedAllowance", "MarriedAllowance", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("MarriedAllowanceType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("MarriedAllowance_MarriedAllowanceType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("MarriedAllowance_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.NightWorkPay", "NightWorkPay", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("NightWorkingType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("NightWorkPay_NightWorkingType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("NightWorkPay_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.OverTimePay", "OverTimePay", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("OverTimePayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("OverTimePay_OverTimePayType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("OverTimePay_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.OwnsOne("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.ShiftPay", "ShiftPay", b1 => + { + b1.Property("CustomizeWorkshopSettingsid") + .HasColumnType("bigint"); + + b1.Property("ShiftPayType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("ShiftPay_ShiftPayType"); + + b1.Property("ShiftType") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("nvarchar(1)") + .HasColumnName("ShiftPay_ShiftType"); + + b1.Property("Value") + .HasColumnType("float") + .HasColumnName("ShiftPay_Value"); + + b1.HasKey("CustomizeWorkshopSettingsid"); + + b1.ToTable("CustomizeWorkshopSettings"); + + b1.WithOwner() + .HasForeignKey("CustomizeWorkshopSettingsid"); + }); + + b.Navigation("BaseYearsPay"); + + b.Navigation("BonusesPay"); + + b.Navigation("CustomizeWorkshopSettingsShifts"); + + b.Navigation("EarlyExit"); + + b.Navigation("FamilyAllowance"); + + b.Navigation("FineAbsenceDeduction"); + + b.Navigation("FridayPay"); + + b.Navigation("InsuranceDeduction"); + + b.Navigation("LateToWork"); + + b.Navigation("LeavePay"); + + b.Navigation("MarriedAllowance"); + + b.Navigation("NightWorkPay"); + + b.Navigation("OverTimePay"); + + b.Navigation("ShiftPay"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.DateSalaryItemAgg.DateSalaryItem", b => + { + b.HasOne("Company.Domain.DateSalaryAgg.DateSalary", "DateSalary") + .WithMany("DateSalaryItemList") + .HasForeignKey("DateSalaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.PercentageAgg.Percentage", "Percentage") + .WithMany("DateSalaryItemList") + .HasForeignKey("PercentageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DateSalary"); + + b.Navigation("Percentage"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeAccountAgg.EmployeeAccount", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeBankInformationAgg.EmployeeBankInformation", b => + { + b.HasOne("Company.Domain.BankAgg.Bank", "Bank") + .WithMany() + .HasForeignKey("BankId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("EmployeeBankInformationList") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Bank"); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeChildrenAgg.EmployeeChildren", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("EmployeeChildrenList") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentItemAgg.EmployeeDocumentItem", b => + { + b.HasOne("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", "EmployeeDocuments") + .WithMany("EmployeeDocumentItemCollection") + .HasForeignKey("EmployeeDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", "EmployeeDocumentsAdminSelection") + .WithMany("SelectedEmployeeDocumentItems") + .HasForeignKey("EmployeeDocumentsAdminViewId"); + + b.OwnsMany("Company.Domain.EmployeeDocumentItemAgg.EmployeeDocumentItemLog", "ItemLogs", b1 => + { + b1.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("id")); + + b1.Property("AdminMessage") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("EmployeeDocumentItemId") + .HasColumnType("bigint"); + + b1.Property("OperationType") + .IsRequired() + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b1.Property("OperatorId") + .HasColumnType("bigint"); + + b1.Property("OperatorType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b1.HasKey("id"); + + b1.HasIndex("EmployeeDocumentItemId"); + + b1.ToTable("EmployeeDocumentItemLogs", (string)null); + + b1.WithOwner("EmployeeDocumentItem") + .HasForeignKey("EmployeeDocumentItemId"); + + b1.Navigation("EmployeeDocumentItem"); + }); + + b.Navigation("EmployeeDocuments"); + + b.Navigation("EmployeeDocumentsAdminSelection"); + + b.Navigation("ItemLogs"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithOne("EmployeeDocumentsAdminSelection") + .HasForeignKey("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", "EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("EmployeeDocuments") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany() + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeInsuranceRecordAgg.EmployeeInsuranceRecord", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("EmployeeInsuranceRecords") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("EmployeeInsuranceRecords") + .HasForeignKey("WorkShopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.EmployerAccountAgg.EmployerAccount", b => + { + b.HasOne("Company.Domain.empolyerAgg.Employer", "Employer") + .WithMany() + .HasForeignKey("EmployerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employer"); + }); + + modelBuilder.Entity("Company.Domain.Evidence.Evidence", b => + { + b.HasOne("Company.Domain.BoardType.BoardType", "BoardType") + .WithMany("EvidencesList") + .HasForeignKey("BoardType_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.File1.File1", "File1") + .WithMany("EvidencesList") + .HasForeignKey("File_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BoardType"); + + b.Navigation("File1"); + }); + + modelBuilder.Entity("Company.Domain.EvidenceDetail.EvidenceDetail", b => + { + b.HasOne("Company.Domain.Evidence.Evidence", "Evidence") + .WithMany("EvidenceDetailsList") + .HasForeignKey("Evidence_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Evidence"); + }); + + modelBuilder.Entity("Company.Domain.FileAlert.FileAlert", b => + { + b.HasOne("Company.Domain.FileState.FileState", "FileState") + .WithMany("FileAlertsList") + .HasForeignKey("FileState_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.File1.File1", "File") + .WithMany("FileAlertsList") + .HasForeignKey("File_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("File"); + + b.Navigation("FileState"); + }); + + modelBuilder.Entity("Company.Domain.FileAndFileEmployerAgg.FileAndFileEmployer", b => + { + b.HasOne("Company.Domain.FileEmployerAgg.FileEmployer", "FileEmployer") + .WithMany("FileAndFileEmployers") + .HasForeignKey("FileEmployerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.File1.File1", "File1") + .WithMany("FileAndFileEmployers") + .HasForeignKey("FileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("File1"); + + b.Navigation("FileEmployer"); + }); + + modelBuilder.Entity("Company.Domain.FileEmployeeAgg.FileEmployee", b => + { + b.HasOne("Company.Domain.RepresentativeAgg.Representative", "Representative") + .WithMany("FileEmployeeList") + .HasForeignKey("RepresentativeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Representative"); + }); + + modelBuilder.Entity("Company.Domain.FileEmployerAgg.FileEmployer", b => + { + b.HasOne("Company.Domain.RepresentativeAgg.Representative", "Representative") + .WithMany("FileEmployerList") + .HasForeignKey("RepresentativeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Representative"); + }); + + modelBuilder.Entity("Company.Domain.FileState.FileState", b => + { + b.HasOne("Company.Domain.FileTiming.FileTiming", "FileTiming") + .WithMany("FileStates") + .HasForeignKey("FileTiming_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FileTiming"); + }); + + modelBuilder.Entity("Company.Domain.FinancialTransactionAgg.FinancialTransaction", b => + { + b.HasOne("Company.Domain.FinancialStatmentAgg.FinancialStatment", "FinancialStatment") + .WithMany("FinancialTransactionList") + .HasForeignKey("FinancialStatementId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FinancialStatment"); + }); + + modelBuilder.Entity("Company.Domain.GroupPlanAgg.GroupPlan", b => + { + b.HasOne("Company.Domain.WorkshopPlanAgg.WorkshopPlan", "WorkshopPlan") + .WithMany("GroupPlans") + .HasForeignKey("WorkshopPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkshopPlan"); + }); + + modelBuilder.Entity("Company.Domain.GroupPlanJobItemAgg.GroupPlanJobItem", b => + { + b.HasOne("Company.Domain.GroupPlanAgg.GroupPlan", "GroupPlan") + .WithMany("GroupPlanJobItems") + .HasForeignKey("GroupPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GroupPlan"); + }); + + modelBuilder.Entity("Company.Domain.HolidayItemAgg.HolidayItem", b => + { + b.HasOne("Company.Domain.HolidayAgg.Holiday", "Holidayss") + .WithMany("HolidayItems") + .HasForeignKey("HolidayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Holidayss"); + }); + + modelBuilder.Entity("Company.Domain.InstitutionContractContactInfoAgg.InstitutionContractContactInfo", b => + { + b.HasOne("Company.Domain.InstitutionContractAgg.InstitutionContract", "InstitutionContracts") + .WithMany("ContactInfoList") + .HasForeignKey("InstitutionContractId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InstitutionContracts"); + }); + + modelBuilder.Entity("Company.Domain.InsurancWorkshopInfoAgg.InsuranceWorkshopInfo", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithOne("InsuranceWorkshopInfo") + .HasForeignKey("Company.Domain.InsurancWorkshopInfoAgg.InsuranceWorkshopInfo", "WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.InsuranceAgg.Insurance", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("Insurances") + .HasForeignKey("WorkShopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.InsuranceEmployeeInfoAgg.InsuranceEmployeeInfo", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithOne("InsuranceEmployeeInfo") + .HasForeignKey("Company.Domain.InsuranceEmployeeInfoAgg.InsuranceEmployeeInfo", "EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Company.Domain.InsuranceJobAndJobsAgg.InsuranceJobAndJobs", b => + { + b.HasOne("Company.Domain.InsuranceJobItemAgg.InsuranceJobItem", "InsuranceJobItem") + .WithMany("InsuranceJobAndJobs") + .HasForeignKey("InsuranceJobItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.JobAgg.Job", "Jobs") + .WithMany("InsuranceJobAndJobs") + .HasForeignKey("JobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsuranceJobItem"); + + b.Navigation("Jobs"); + }); + + modelBuilder.Entity("Company.Domain.InsuranceJobItemAgg.InsuranceJobItem", b => + { + b.HasOne("Company.Domain.InsurancJobAgg.InsuranceJob", "InsuranceJob") + .WithMany("InsuranceJobItemList") + .HasForeignKey("InsuranceJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsuranceJob"); + }); + + modelBuilder.Entity("Company.Domain.InsuranceWorkshopAgg.InsuranceListWorkshop", b => + { + b.HasOne("Company.Domain.InsuranceListAgg.InsuranceList", "InsuranceList") + .WithMany("InsuranceListWorkshops") + .HasForeignKey("InsurancListId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("InsuranceListWorkshops") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InsuranceList"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.LeftWorkAgg.LeftWork", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("LeftWorks") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("LeftWorks") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.LeftWorkInsuranceAgg.LeftWorkInsurance", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("LeftWorkInsurances") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("LeftWorkInsurances") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.LoanAgg.Entities.Loan", b => + { + b.OwnsMany("Company.Domain.LoanAgg.Entities.LoanInstallment", "LoanInstallments", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("AmountForMonth") + .HasColumnType("float"); + + b1.Property("InstallmentDate") + .HasColumnType("datetime2"); + + b1.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("LoanId") + .HasColumnType("bigint"); + + b1.Property("Month") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b1.Property("Year") + .HasMaxLength(4) + .HasColumnType("nvarchar(4)"); + + b1.HasKey("Id"); + + b1.HasIndex("LoanId"); + + b1.ToTable("LoanInstallment"); + + b1.WithOwner() + .HasForeignKey("LoanId"); + }); + + b.Navigation("LoanInstallments"); + }); + + modelBuilder.Entity("Company.Domain.MasterPenaltyTitle.MasterPenaltyTitle", b => + { + b.HasOne("Company.Domain.MasterPetition.MasterPetition", "MasterPetition") + .WithMany("MasterPenaltyTitlesList") + .HasForeignKey("MasterPetition_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MasterPetition"); + }); + + modelBuilder.Entity("Company.Domain.MasterPetition.MasterPetition", b => + { + b.HasOne("Company.Domain.BoardType.BoardType", "BoardType") + .WithMany("MasterPetitionsList") + .HasForeignKey("BoardType_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.File1.File1", "File1") + .WithMany("MasterPetitionsList") + .HasForeignKey("File_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BoardType"); + + b.Navigation("File1"); + }); + + modelBuilder.Entity("Company.Domain.MasterWorkHistory.MasterWorkHistory", b => + { + b.HasOne("Company.Domain.MasterPetition.MasterPetition", "MasterPetition") + .WithMany("MasterWorkHistoriesList") + .HasForeignKey("MasterPetition_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MasterPetition"); + }); + + modelBuilder.Entity("Company.Domain.ModuleTextManagerAgg.EntityModuleTextManager", b => + { + b.HasOne("Company.Domain.ModuleAgg.EntityModule", "Module") + .WithMany("EntityModuleTextManagers") + .HasForeignKey("ModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.TextManagerAgg.EntityTextManager", "TextManager") + .WithMany("EntityModuleTextManagers") + .HasForeignKey("TextManagerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Module"); + + b.Navigation("TextManager"); + }); + + modelBuilder.Entity("Company.Domain.PaymentToEmployeeItemAgg.PaymentToEmployeeItem", b => + { + b.HasOne("Company.Domain.PaymentToEmployeeAgg.PaymentToEmployee", "PaymentToEmployee") + .WithMany("PaymentToEmployeeItemList") + .HasForeignKey("PaymentToEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PaymentToEmployee"); + }); + + modelBuilder.Entity("Company.Domain.PenaltyTitle.PenaltyTitle", b => + { + b.HasOne("Company.Domain.Petition.Petition", "Petition") + .WithMany("PenaltyTitlesList") + .HasForeignKey("Petition_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Petition"); + }); + + modelBuilder.Entity("Company.Domain.PersonnelCodeAgg.PersonnelCodeDomain", b => + { + b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee") + .WithMany("PersonnelCodeList") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("PersonnelCodeList") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.Petition.Petition", b => + { + b.HasOne("Company.Domain.BoardType.BoardType", "BoardType") + .WithMany("PetitionsList") + .HasForeignKey("BoardType_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.File1.File1", "File1") + .WithMany("PetitionsList") + .HasForeignKey("File_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BoardType"); + + b.Navigation("File1"); + }); + + modelBuilder.Entity("Company.Domain.ProceedingSession.ProceedingSession", b => + { + b.HasOne("Company.Domain.Board.Board", "Board") + .WithMany("ProceedingSessionsList") + .HasForeignKey("Board_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Board"); + }); + + modelBuilder.Entity("Company.Domain.RollCallEmployeeStatusAgg.RollCallEmployeeStatus", b => + { + b.HasOne("Company.Domain.RollCallEmployeeAgg.RollCallEmployee", "RollCallEmployee") + .WithMany("EmployeesStatus") + .HasForeignKey("RollCallEmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RollCallEmployee"); + }); + + modelBuilder.Entity("Company.Domain.RollCallServiceAgg.RollCallService", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("RollCallServicesList") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.SubtitleAgg.EntitySubtitle", b => + { + b.HasOne("Company.Domain.SubtitleAgg.EntitySubtitle", null) + .WithMany("Subtitles") + .HasForeignKey("EntitySubtitleid"); + + b.HasOne("Company.Domain.OriginalTitleAgg.EntityOriginalTitle", "EntityOriginalTitle") + .WithMany("Subtitles") + .HasForeignKey("OriginalTitle_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityOriginalTitle"); + }); + + modelBuilder.Entity("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("TaxLeftWorkCategoryList") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.TaxLeftWorkItemAgg.TaxLeftWorkItem", b => + { + b.HasOne("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", "TaxLeftWorkCategory") + .WithMany("TaxLeftWorkItemList") + .HasForeignKey("TaxLeftWorkCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TaxLeftWorkCategory"); + }); + + modelBuilder.Entity("Company.Domain.TemporaryClientRegistrationAgg.WorkshopServicesTemp", b => + { + b.HasOne("Company.Domain.TemporaryClientRegistrationAgg.WorkshopTemp", "WorkshopTemp") + .WithMany("WorkshopServicesTemps") + .HasForeignKey("WorkshopTempId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkshopTemp"); + }); + + modelBuilder.Entity("Company.Domain.WorkHistory.WorkHistory", b => + { + b.HasOne("Company.Domain.Petition.Petition", "Petition") + .WithMany("WorkHistoriesList") + .HasForeignKey("Petition_Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Petition"); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursAgg.WorkingHours", b => + { + b.HasOne("Company.Domain.ContractAgg.Contract", "Contracts") + .WithMany("WorkingHoursList") + .HasForeignKey("ContractId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Contracts"); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursItemsAgg.WorkingHoursItems", b => + { + b.HasOne("Company.Domain.WorkingHoursAgg.WorkingHours", "WorkingHourses") + .WithMany("WorkingHoursItemsList") + .HasForeignKey("WorkingHoursId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkingHourses"); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursTempItemAgg.WorkingHoursTempItem", b => + { + b.HasOne("Company.Domain.WorkingHoursTempAgg.WorkingHoursTemp", "WorkingHoursTemp") + .WithMany("WorkingHoursTempItemList") + .HasForeignKey("WorkingHoursTempId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkingHoursTemp"); + }); + + modelBuilder.Entity("Company.Domain.WorkshopAccountAgg.WorkshopAccount", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany() + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.WorkshopEmployerAgg.WorkshopEmployer", b => + { + b.HasOne("Company.Domain.empolyerAgg.Employer", "Employer") + .WithMany("WorkshopEmployers") + .HasForeignKey("EmployerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("WorkshopEmployers") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employer"); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.WorkshopPlanEmployeeAgg.WorkshopPlanEmployee", b => + { + b.HasOne("Company.Domain.WorkshopPlanAgg.WorkshopPlan", "WorkshopPlan") + .WithMany("WorkshopPlanEmployees") + .HasForeignKey("WorkshopPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WorkshopPlan"); + }); + + modelBuilder.Entity("Company.Domain.WorkshopSubAccountAgg.WorkshopSubAccount", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("WorkshopSubAccounts") + .HasForeignKey("WorkshopId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Workshop"); + }); + + modelBuilder.Entity("Company.Domain.YearlySalaryItemsAgg.YearlySalaryItem", b => + { + b.HasOne("Company.Domain.YearlySalaryAgg.YearlySalary", "YearlySalary") + .WithMany("YearlySalaryItemsList") + .HasForeignKey("YearlySalaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("YearlySalary"); + }); + + modelBuilder.Entity("Company.Domain.empolyerAgg.Employer", b => + { + b.HasOne("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", "ContractingParty") + .WithMany("Employers") + .HasForeignKey("ContractingPartyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ContractingParty"); + }); + + modelBuilder.Entity("EmployerWorkshop", b => + { + b.HasOne("Company.Domain.empolyerAgg.Employer", null) + .WithMany() + .HasForeignKey("EmployersListid") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Company.Domain.WorkshopAgg.Workshop", null) + .WithMany() + .HasForeignKey("WorkshopsListid") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Company.Domain.Board.Board", b => + { + b.Navigation("ProceedingSessionsList"); + }); + + modelBuilder.Entity("Company.Domain.BoardType.BoardType", b => + { + b.Navigation("BoardsList"); + + b.Navigation("EvidencesList"); + + b.Navigation("MasterPetitionsList"); + + b.Navigation("PetitionsList"); + }); + + modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b => + { + b.Navigation("Employers"); + }); + + modelBuilder.Entity("Company.Domain.ContractAgg.Contract", b => + { + b.Navigation("WorkingHoursList"); + }); + + modelBuilder.Entity("Company.Domain.CrossJobAgg.CrossJob", b => + { + b.Navigation("CrossJobItemsList"); + }); + + modelBuilder.Entity("Company.Domain.CrossJobGuildAgg.CrossJobGuild", b => + { + b.Navigation("CrossJobList"); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", b => + { + b.Navigation("CustomizeWorkshopEmployeeSettingsCollection"); + }); + + modelBuilder.Entity("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", b => + { + b.Navigation("CustomizeWorkshopGroupSettingsCollection"); + }); + + modelBuilder.Entity("Company.Domain.DateSalaryAgg.DateSalary", b => + { + b.Navigation("DateSalaryItemList"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeAgg.Employee", b => + { + b.Navigation("ClientEmployeeWorkshopList"); + + b.Navigation("Contracts"); + + b.Navigation("CustomizeCheckouts"); + + b.Navigation("EmployeeBankInformationList"); + + b.Navigation("EmployeeChildrenList"); + + b.Navigation("EmployeeDocuments"); + + b.Navigation("EmployeeDocumentsAdminSelection"); + + b.Navigation("EmployeeInsuranceRecords"); + + b.Navigation("InsuranceEmployeeInfo"); + + b.Navigation("LeftWorkInsurances"); + + b.Navigation("LeftWorks"); + + b.Navigation("PersonnelCodeList"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", b => + { + b.Navigation("SelectedEmployeeDocumentItems"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", b => + { + b.Navigation("EmployeeDocumentItemCollection"); + }); + + modelBuilder.Entity("Company.Domain.Evidence.Evidence", b => + { + b.Navigation("EvidenceDetailsList"); + }); + + modelBuilder.Entity("Company.Domain.File1.File1", b => + { + b.Navigation("BoardsList"); + + b.Navigation("EvidencesList"); + + b.Navigation("FileAlertsList"); + + b.Navigation("FileAndFileEmployers"); + + b.Navigation("MasterPetitionsList"); + + b.Navigation("PetitionsList"); + }); + + modelBuilder.Entity("Company.Domain.FileEmployerAgg.FileEmployer", b => + { + b.Navigation("FileAndFileEmployers"); + }); + + modelBuilder.Entity("Company.Domain.FileState.FileState", b => + { + b.Navigation("FileAlertsList"); + }); + + modelBuilder.Entity("Company.Domain.FileTiming.FileTiming", b => + { + b.Navigation("FileStates"); + }); + + modelBuilder.Entity("Company.Domain.FinancialStatmentAgg.FinancialStatment", b => + { + b.Navigation("FinancialTransactionList"); + }); + + modelBuilder.Entity("Company.Domain.GroupPlanAgg.GroupPlan", b => + { + b.Navigation("GroupPlanJobItems"); + }); + + modelBuilder.Entity("Company.Domain.HolidayAgg.Holiday", b => + { + b.Navigation("HolidayItems"); + }); + + modelBuilder.Entity("Company.Domain.InstitutionContractAgg.InstitutionContract", b => + { + b.Navigation("ContactInfoList"); + }); + + modelBuilder.Entity("Company.Domain.InsurancJobAgg.InsuranceJob", b => + { + b.Navigation("InsuranceJobItemList"); + }); + + modelBuilder.Entity("Company.Domain.InsuranceJobItemAgg.InsuranceJobItem", b => + { + b.Navigation("InsuranceJobAndJobs"); + }); + + modelBuilder.Entity("Company.Domain.InsuranceListAgg.InsuranceList", b => + { + b.Navigation("InsuranceListWorkshops"); + }); + + modelBuilder.Entity("Company.Domain.JobAgg.Job", b => + { + b.Navigation("ContractsList"); + + b.Navigation("CrossJobItemsList"); + + b.Navigation("InsuranceJobAndJobs"); + }); + + modelBuilder.Entity("Company.Domain.MandatoryHoursAgg.MandatoryHours", b => + { + b.Navigation("Contracts"); + }); + + modelBuilder.Entity("Company.Domain.MasterPetition.MasterPetition", b => + { + b.Navigation("MasterPenaltyTitlesList"); + + b.Navigation("MasterWorkHistoriesList"); + }); + + modelBuilder.Entity("Company.Domain.ModuleAgg.EntityModule", b => + { + b.Navigation("EntityModuleTextManagers"); + }); + + modelBuilder.Entity("Company.Domain.OriginalTitleAgg.EntityOriginalTitle", b => + { + b.Navigation("Subtitles"); + }); + + modelBuilder.Entity("Company.Domain.PaymentToEmployeeAgg.PaymentToEmployee", b => + { + b.Navigation("PaymentToEmployeeItemList"); + }); + + modelBuilder.Entity("Company.Domain.PercentageAgg.Percentage", b => + { + b.Navigation("DateSalaryItemList"); + }); + + modelBuilder.Entity("Company.Domain.Petition.Petition", b => + { + b.Navigation("PenaltyTitlesList"); + + b.Navigation("WorkHistoriesList"); + }); + + modelBuilder.Entity("Company.Domain.RepresentativeAgg.Representative", b => + { + b.Navigation("ContractingParties"); + + b.Navigation("FileEmployeeList"); + + b.Navigation("FileEmployerList"); + }); + + modelBuilder.Entity("Company.Domain.RollCallEmployeeAgg.RollCallEmployee", b => + { + b.Navigation("EmployeesStatus"); + }); + + modelBuilder.Entity("Company.Domain.SubtitleAgg.EntitySubtitle", b => + { + b.Navigation("Chapters"); + + b.Navigation("Subtitles"); + }); + + modelBuilder.Entity("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", b => + { + b.Navigation("TaxLeftWorkItemList"); + }); + + modelBuilder.Entity("Company.Domain.TemporaryClientRegistrationAgg.WorkshopTemp", b => + { + b.Navigation("WorkshopServicesTemps"); + }); + + modelBuilder.Entity("Company.Domain.TextManagerAgg.EntityTextManager", b => + { + b.Navigation("EntityModuleTextManagers"); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursAgg.WorkingHours", b => + { + b.Navigation("WorkingHoursItemsList"); + }); + + modelBuilder.Entity("Company.Domain.WorkingHoursTempAgg.WorkingHoursTemp", b => + { + b.Navigation("WorkingHoursTempItemList"); + }); + + modelBuilder.Entity("Company.Domain.WorkshopAgg.Workshop", b => + { + b.Navigation("Checkouts"); + + b.Navigation("ClientEmployeeWorkshopList"); + + b.Navigation("Contracts2"); + + b.Navigation("CustomizeCheckouts"); + + b.Navigation("CustomizeWorkshopSettings"); + + b.Navigation("EmployeeInsuranceRecords"); + + b.Navigation("InsuranceListWorkshops"); + + b.Navigation("InsuranceWorkshopInfo"); + + b.Navigation("Insurances"); + + b.Navigation("LeftWorkInsurances"); + + b.Navigation("LeftWorks"); + + b.Navigation("PersonnelCodeList"); + + b.Navigation("RollCallServicesList"); + + b.Navigation("TaxLeftWorkCategoryList"); + + b.Navigation("WorkshopEmployers"); + + b.Navigation("WorkshopSubAccounts"); + }); + + modelBuilder.Entity("Company.Domain.WorkshopPlanAgg.WorkshopPlan", b => + { + b.Navigation("GroupPlans"); + + b.Navigation("WorkshopPlanEmployees"); + }); + + modelBuilder.Entity("Company.Domain.YearlySalaryAgg.YearlySalary", b => + { + b.Navigation("Contracts"); + + b.Navigation("YearlySalaryItemsList"); + }); + + modelBuilder.Entity("Company.Domain.empolyerAgg.Employer", b => + { + b.Navigation("Contracts"); + + b.Navigation("WorkshopEmployers"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.cs b/CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.cs new file mode 100644 index 00000000..3c3e0dce --- /dev/null +++ b/CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.cs @@ -0,0 +1,121 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace CompanyManagment.EFCore.Migrations +{ + /// + public partial class addinspectiondebtapprovaltoinsurancelist : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Debt_Amount", + table: "InsuranceLists", + type: "float", + nullable: false, + defaultValue: 0.0); + + migrationBuilder.AddColumn( + name: "Debt_DebtDate", + table: "InsuranceLists", + type: "datetime2", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "Debt_MediaId", + table: "InsuranceLists", + type: "bigint", + nullable: false, + defaultValue: 0L); + + migrationBuilder.AddColumn( + name: "Debt_Type", + table: "InsuranceLists", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "None"); + + migrationBuilder.AddColumn( + name: "EmployerApproval_Description", + table: "InsuranceLists", + type: "nvarchar(500)", + maxLength: 500, + nullable: true); + + migrationBuilder.AddColumn( + name: "EmployerApproval_Status", + table: "InsuranceLists", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "None"); + + migrationBuilder.AddColumn( + name: "Inspection_LastInspectionDateTime", + table: "InsuranceLists", + type: "datetime2", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "Inspection_MediaId", + table: "InsuranceLists", + type: "bigint", + nullable: false, + defaultValue: 0L); + + migrationBuilder.AddColumn( + name: "Inspection_Type", + table: "InsuranceLists", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "None"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Debt_Amount", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "Debt_DebtDate", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "Debt_MediaId", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "Debt_Type", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "EmployerApproval_Description", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "EmployerApproval_Status", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "Inspection_LastInspectionDateTime", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "Inspection_MediaId", + table: "InsuranceLists"); + + migrationBuilder.DropColumn( + name: "Inspection_Type", + table: "InsuranceLists"); + } + } +} diff --git a/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs b/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs index 9950cfeb..4c81685e 100644 --- a/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs +++ b/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs @@ -1,5 +1,6 @@ // using System; +using System.Collections.Generic; using CompanyManagment.EFCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -3320,6 +3321,55 @@ namespace CompanyManagment.EFCore.Migrations .HasMaxLength(4) .HasColumnType("nvarchar(4)"); + b.ComplexProperty>("Debt", "Company.Domain.InsuranceListAgg.InsuranceList.Debt#InsuranceListDebt", b1 => + { + b1.IsRequired(); + + b1.Property("Amount") + .HasColumnType("float"); + + b1.Property("DebtDate") + .HasColumnType("datetime2"); + + b1.Property("MediaId") + .HasColumnType("bigint"); + + b1.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + }); + + b.ComplexProperty>("EmployerApproval", "Company.Domain.InsuranceListAgg.InsuranceList.EmployerApproval#InsuranceListEmployerApproval", b1 => + { + b1.IsRequired(); + + b1.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b1.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + }); + + b.ComplexProperty>("Inspection", "Company.Domain.InsuranceListAgg.InsuranceList.Inspection#InsuranceListInspection", b1 => + { + b1.IsRequired(); + + b1.Property("LastInspectionDateTime") + .HasColumnType("datetime2"); + + b1.Property("MediaId") + .HasColumnType("bigint"); + + b1.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + }); + b.HasKey("id"); b.ToTable("InsuranceLists", (string)null);