diff --git a/AccountManagement.Application.Contracts/Account/AccountLeftWorkViewModel.cs b/AccountManagement.Application.Contracts/Account/AccountLeftWorkViewModel.cs new file mode 100644 index 00000000..cea5b36e --- /dev/null +++ b/AccountManagement.Application.Contracts/Account/AccountLeftWorkViewModel.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +namespace AccountManagement.Application.Contracts.Account; + +public class AccountLeftWorkViewModel +{ + + public string AccountFullName { get; set; } + public long AccountId { get; set; } + public string StartDateFa { get; set; } + public string LeftDateFa { get; set; } + public List AccountList { get; set; } + public List WorkshopAccountlist { get; set; } +} \ No newline at end of file diff --git a/AccountManagement.Application.Contracts/Account/IAccountApplication.cs b/AccountManagement.Application.Contracts/Account/IAccountApplication.cs index 432ffef6..2e14ddb5 100644 --- a/AccountManagement.Application.Contracts/Account/IAccountApplication.cs +++ b/AccountManagement.Application.Contracts/Account/IAccountApplication.cs @@ -28,8 +28,10 @@ namespace AccountManagement.Application.Contracts.Account OperationResult DeActive(long id); OperationResult DirectLogin(long id); - #region Mahan - List AccountsForAssign(long accountId); + AccountLeftWorkViewModel WorkshopList(long accountId); + + #region Mahan + List AccountsForAssign(long accountId); List GetAccountsByPositionId(long positionId); List GetAccountLowerPositionvalue(); diff --git a/AccountManagement.Application.Contracts/Account/WorkshopAccountlistViewModel.cs b/AccountManagement.Application.Contracts/Account/WorkshopAccountlistViewModel.cs new file mode 100644 index 00000000..a1a6d90f --- /dev/null +++ b/AccountManagement.Application.Contracts/Account/WorkshopAccountlistViewModel.cs @@ -0,0 +1,12 @@ +namespace AccountManagement.Application.Contracts.Account; + +public class WorkshopAccountlistViewModel +{ + public long WorkshopId { get; set; } + public string WorkshopName { get; set; } + public long AccountId { get; set; } + public string ContractAndCheckout { get; set; } + public string Insurance { get; set; } + public string Tax { get; set; } + public string IsActiveSting { get; set; } +} \ No newline at end of file diff --git a/AccountManagement.Application/AccountApplication.cs b/AccountManagement.Application/AccountApplication.cs index 96dc7c34..1b6fd30d 100644 --- a/AccountManagement.Application/AccountApplication.cs +++ b/AccountManagement.Application/AccountApplication.cs @@ -8,6 +8,7 @@ using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using _0_Framework.Application.Sms; +using AccountManagement.Domain.AccountLeftWorkAgg; using AccountManagement.Domain.CameraAccountAgg; using AccountManagement.Domain.RoleAgg; using Microsoft.AspNetCore.Http; @@ -27,16 +28,18 @@ public class AccountApplication : IAccountApplication private readonly ISmsService _smsService; private readonly ICameraAccountRepository _cameraAccountRepository; private readonly IPositionRepository _positionRepository; + private readonly IAccountLeftworkRepository _accountLeftworkRepository; public AccountApplication(IAccountRepository accountRepository, IPasswordHasher passwordHasher, - IFileUploader fileUploader, IAuthHelper authHelper, IRoleRepository roleRepository, IWorker worker, ISmsService smsService, ICameraAccountRepository cameraAccountRepository, IPositionRepository positionRepository) + IFileUploader fileUploader, IAuthHelper authHelper, IRoleRepository roleRepository, IWorker worker, ISmsService smsService, ICameraAccountRepository cameraAccountRepository, IPositionRepository positionRepository, IAccountLeftworkRepository accountLeftworkRepository) { _authHelper = authHelper; _roleRepository = roleRepository; _smsService = smsService; _cameraAccountRepository = cameraAccountRepository; _positionRepository = positionRepository; + _accountLeftworkRepository = accountLeftworkRepository; _fileUploader = fileUploader; _passwordHasher = passwordHasher; _accountRepository = accountRepository; @@ -411,6 +414,24 @@ public class AccountApplication : IAccountApplication return operation.Succcedded(2); } + public AccountLeftWorkViewModel WorkshopList(long accountId) + { + string fullName = _accountRepository.GetById(accountId).Fullname; + var list =_accountLeftworkRepository.WorkshopList(accountId); + var lefts = _accountLeftworkRepository.GetByAccountId(accountId); + var result = new AccountLeftWorkViewModel + { +AccountId = accountId, + AccountFullName = fullName, + StartDateFa = lefts.StartWorkFa, + LeftDateFa = lefts.LeftWorkFa, + WorkshopAccountlist = list, + }; + + return result; + + } + public List AccountsForAssign(long accountId) { return _accountRepository.AccountsForAssign(accountId); diff --git a/AccountManagement.Configuration/AccountManagementBootstrapper.cs b/AccountManagement.Configuration/AccountManagementBootstrapper.cs index 2bb7cc9f..492d7547 100644 --- a/AccountManagement.Configuration/AccountManagementBootstrapper.cs +++ b/AccountManagement.Configuration/AccountManagementBootstrapper.cs @@ -7,6 +7,7 @@ using AccountManagement.Application.Contracts.Task; using AccountManagement.Application.Contracts.TaskSubject; using AccountManagement.Application.Contracts.Ticket; using AccountManagement.Domain.AccountAgg; +using AccountManagement.Domain.AccountLeftWorkAgg; using AccountManagement.Domain.AssignAgg; using AccountManagement.Domain.CameraAccountAgg; using AccountManagement.Domain.MediaAgg; @@ -16,6 +17,7 @@ using AccountManagement.Domain.TaskSubjectAgg; using AccountManagement.Domain.TicketAgg; using AccountMangement.Infrastructure.EFCore; using AccountMangement.Infrastructure.EFCore.Repository; +using Company.Domain.WorkshopAccountAgg; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using TaskManager.Application; @@ -37,8 +39,11 @@ namespace AccountManagement.Configuration services.AddTransient(); services.AddTransient(); - #region Mahan - services.AddTransient(); + services.AddTransient(); + + //services.AddTransient(); + #region Mahan + services.AddTransient(); services.AddTransient(); services.AddTransient(); diff --git a/AccountManagement.Domain/AccountAgg/Account.cs b/AccountManagement.Domain/AccountAgg/Account.cs index 76a6376e..b398098a 100644 --- a/AccountManagement.Domain/AccountAgg/Account.cs +++ b/AccountManagement.Domain/AccountAgg/Account.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using _0_Framework.Domain; +using AccountManagement.Domain.AccountLeftWorkAgg; using AccountManagement.Domain.CameraAccountAgg; using AccountManagement.Domain.RoleAgg; using TaskManager.Domain.PositionAgg; @@ -33,6 +34,7 @@ namespace AccountManagement.Domain.AccountAgg #endregion public List CameraAccounts { get; private set; } + public List AccountLeftWorkList { get; set; } public Account(string fullname, string username, string password, string mobile, long roleId, string profilePhoto, string roleName, string adminAreaPermission, string clientAriaPermission) { diff --git a/AccountManagement.Domain/AccountLeftWorkAgg/AccountLeftWork.cs b/AccountManagement.Domain/AccountLeftWorkAgg/AccountLeftWork.cs new file mode 100644 index 00000000..5d13a1a3 --- /dev/null +++ b/AccountManagement.Domain/AccountLeftWorkAgg/AccountLeftWork.cs @@ -0,0 +1,27 @@ +using System; +using _0_Framework.Domain; +using AccountManagement.Application.Contracts.Account; +using AccountManagement.Domain.AccountAgg; + +namespace AccountManagement.Domain.AccountLeftWorkAgg; + +public class AccountLeftWork : EntityBase +{ + public AccountLeftWork(DateTime startWorkGr, DateTime leftWorkGr, long accountId) + { + StartWorkGr = startWorkGr; + LeftWorkGr = leftWorkGr; + AccountId = accountId; + } + + public DateTime StartWorkGr { get; private set; } + public DateTime LeftWorkGr { get; private set; } + public long AccountId { get; private set; } + public Account Account { get; set; } + + public void Edit(DateTime startWorkGr, DateTime leftWorkGr) + { + StartWorkGr = startWorkGr; + LeftWorkGr = leftWorkGr; + } +} \ No newline at end of file diff --git a/AccountManagement.Domain/AccountLeftWorkAgg/IAccountLeftworkRepository.cs b/AccountManagement.Domain/AccountLeftWorkAgg/IAccountLeftworkRepository.cs new file mode 100644 index 00000000..c95caacc --- /dev/null +++ b/AccountManagement.Domain/AccountLeftWorkAgg/IAccountLeftworkRepository.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using _0_Framework.Domain; +using AccountManagement.Application.Contracts.Account; + +namespace AccountManagement.Domain.AccountLeftWorkAgg; + +public interface IAccountLeftworkRepository : IRepository +{ + (string StartWorkFa, string LeftWorkFa) GetByAccountId(long accountId); + List WorkshopList(long accountId); +} \ No newline at end of file diff --git a/AccountMangement.Infrastructure.EFCore/AccountContext.cs b/AccountMangement.Infrastructure.EFCore/AccountContext.cs index 98762f3c..2c4e2d04 100644 --- a/AccountMangement.Infrastructure.EFCore/AccountContext.cs +++ b/AccountMangement.Infrastructure.EFCore/AccountContext.cs @@ -2,6 +2,7 @@ using AccountMangement.Infrastructure.EFCore.Mappings; using Microsoft.EntityFrameworkCore; using System; +using AccountManagement.Domain.AccountLeftWorkAgg; using AccountManagement.Domain.CameraAccountAgg; using AccountManagement.Domain.RoleAgg; using AccountManagement.Domain.AssignAgg; @@ -25,7 +26,7 @@ namespace AccountMangement.Infrastructure.EFCore public DbSet Accounts { get; set; } public DbSet Roles { get; set; } public DbSet CameraAccounts { get; set; } - + public DbSet AccountLeftWorks { get; set; } #region Mahan public DbSet Positions { get; set; } diff --git a/AccountMangement.Infrastructure.EFCore/Mappings/AccountLeftWorkMapping.cs b/AccountMangement.Infrastructure.EFCore/Mappings/AccountLeftWorkMapping.cs new file mode 100644 index 00000000..48e5eaf7 --- /dev/null +++ b/AccountMangement.Infrastructure.EFCore/Mappings/AccountLeftWorkMapping.cs @@ -0,0 +1,23 @@ +using AccountManagement.Domain.AccountLeftWorkAgg; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace AccountMangement.Infrastructure.EFCore.Mappings; + +public class AccountLeftWorkMapping : IEntityTypeConfiguration +{ + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("AccountLeftWork"); + builder.HasKey(x => x.id); + + builder.Property(x => x.id); + builder.Property(x => x.StartWorkGr); + builder.Property(x => x.LeftWorkGr); + + + builder.HasOne(x => x.Account) + .WithMany(x => x.AccountLeftWorkList) + .HasForeignKey(x => x.AccountId); + } +} \ No newline at end of file diff --git a/AccountMangement.Infrastructure.EFCore/Mappings/AccountMapping.cs b/AccountMangement.Infrastructure.EFCore/Mappings/AccountMapping.cs index 066f5e0e..4bb3309f 100644 --- a/AccountMangement.Infrastructure.EFCore/Mappings/AccountMapping.cs +++ b/AccountMangement.Infrastructure.EFCore/Mappings/AccountMapping.cs @@ -30,5 +30,8 @@ public class AccountMapping : IEntityTypeConfiguration .WithOne(x => x.Account) .HasForeignKey(x => x.AccountId); builder.HasOne(x => x.Position).WithMany(x => x.Accounts).HasForeignKey(x => x.PositionId).IsRequired(false); + builder.HasMany(x => x.AccountLeftWorkList) + .WithOne(x => x.Account) + .HasForeignKey(x => x.AccountId); } } \ No newline at end of file diff --git a/AccountMangement.Infrastructure.EFCore/Migrations/20240722150241_AccountLeftworkTable.Designer.cs b/AccountMangement.Infrastructure.EFCore/Migrations/20240722150241_AccountLeftworkTable.Designer.cs new file mode 100644 index 00000000..3d5e32d0 --- /dev/null +++ b/AccountMangement.Infrastructure.EFCore/Migrations/20240722150241_AccountLeftworkTable.Designer.cs @@ -0,0 +1,768 @@ +// +using System; +using AccountMangement.Infrastructure.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace AccountMangement.Infrastructure.EFCore.Migrations +{ + [DbContext(typeof(AccountContext))] + [Migration("20240722150241_AccountLeftworkTable")] + partial class AccountLeftworkTable + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AdminAreaPermission") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("ClientAriaPermission") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("Fullname") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsActiveString") + .HasMaxLength(6) + .HasColumnType("nvarchar(6)"); + + b.Property("Mobile") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PositionId") + .HasMaxLength(10) + .HasColumnType("bigint"); + + b.Property("ProfilePhoto") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("RoleId") + .HasColumnType("bigint"); + + b.Property("RoleName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("VerifyCode") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("id"); + + b.HasIndex("PositionId"); + + b.HasIndex("RoleId"); + + b.ToTable("Accounts", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AccountLeftWorkAgg.AccountLeftWork", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("LeftWorkGr") + .HasColumnType("datetime2"); + + b.Property("StartWorkGr") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.HasIndex("AccountId"); + + b.ToTable("AccountLeftWork", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Response") + .HasColumnType("ntext"); + + b.Property("TicketId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TicketId"); + + b.ToTable("AdminResponses", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseMediaAgg.AdminResponseMedia", b => + { + b.Property("AdminResponseId") + .HasColumnType("bigint"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.HasKey("AdminResponseId", "MediaId"); + + b.HasIndex("MediaId"); + + b.ToTable("AdminResponseMedias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AssignAgg.Assign", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AssignedId") + .HasColumnType("bigint"); + + b.Property("AssignedName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("AssignedPositionValue") + .HasColumnType("int"); + + b.Property("AssignerId") + .HasColumnType("bigint"); + + b.Property("AssignerPositionValue") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("TaskId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TaskId"); + + b.ToTable("Assigns", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.CameraAccountAgg.CameraAccount", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveSting") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Mobile") + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.Property("WorkshopName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.HasIndex("AccountId"); + + b.ToTable("CameraAccounts", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Response") + .HasColumnType("ntext"); + + b.Property("TicketId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TicketId"); + + b.ToTable("ClientResponses", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseMediaAgg.ClientResponseMedia", b => + { + b.Property("ClientResponseId") + .HasColumnType("bigint"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.HasKey("ClientResponseId", "MediaId"); + + b.HasIndex("MediaId"); + + b.ToTable("ClientResponseMedias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.MediaAgg.Media", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Category") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Path") + .HasColumnType("ntext"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.ToTable("Medias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.ToTable("Roles", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AcceptedTimeRequest") + .HasColumnType("int"); + + b.Property("CancelDescription") + .HasColumnType("ntext"); + + b.Property("ContractingPartyName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("ntext"); + + b.Property("DoneDescription") + .HasColumnType("ntext"); + + b.Property("EndTaskDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveString") + .HasMaxLength(7) + .HasColumnType("nvarchar(7)"); + + b.Property("IsCancel") + .HasColumnType("bit"); + + b.Property("IsCanceledRequest") + .HasColumnType("bit"); + + b.Property("IsDone") + .HasColumnType("bit"); + + b.Property("IsDoneRequest") + .HasColumnType("bit"); + + b.Property("RequestDate") + .HasColumnType("datetime2"); + + b.Property("SenderId") + .HasColumnType("bigint"); + + b.Property("StartTaskDate") + .HasColumnType("datetime2"); + + b.Property("TicketId") + .HasColumnType("bigint"); + + b.Property("TimeRequest") + .HasColumnType("bit"); + + b.Property("TimeRequestDescription") + .HasColumnType("ntext"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.ToTable("TasksManager", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskMediaAgg.TaskMedia", b => + { + b.Property("MediaId") + .HasColumnType("bigint"); + + b.Property("TaskId") + .HasColumnType("bigint"); + + b.HasKey("MediaId", "TaskId"); + + b.HasIndex("TaskId"); + + b.ToTable("TasksMedias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskSubjectAgg.TaskSubject", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.ToTable("TaskSubjects", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketAgg.Ticket", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractingPartyName") + .HasMaxLength(155) + .HasColumnType("nvarchar(155)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("ntext"); + + b.Property("SenderId") + .HasColumnType("bigint"); + + b.Property("Status") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("TaskId") + .HasColumnType("bigint"); + + b.Property("TicketType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Title") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("id"); + + b.ToTable("Tickets", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketMediasAgg.TicketMedia", b => + { + b.Property("TicketId") + .HasColumnType("bigint"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.HasKey("TicketId", "MediaId"); + + b.HasIndex("MediaId"); + + b.ToTable("TicketMedias", (string)null); + }); + + modelBuilder.Entity("TaskManager.Domain.PositionAgg.Position", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("PositionName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PositionValue") + .HasMaxLength(2) + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("Positions", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b => + { + b.HasOne("TaskManager.Domain.PositionAgg.Position", "Position") + .WithMany("Accounts") + .HasForeignKey("PositionId"); + + b.HasOne("AccountManagement.Domain.RoleAgg.Role", "Role") + .WithMany("Accounts") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Position"); + + b.Navigation("Role"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AccountLeftWorkAgg.AccountLeftWork", b => + { + b.HasOne("AccountManagement.Domain.AccountAgg.Account", "Account") + .WithMany("AccountLeftWorkList") + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Account"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b => + { + b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket") + .WithMany("AdminResponses") + .HasForeignKey("TicketId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Ticket"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseMediaAgg.AdminResponseMedia", b => + { + b.HasOne("AccountManagement.Domain.AdminResponseAgg.AdminResponse", "AdminResponse") + .WithMany("AdminResponseMedias") + .HasForeignKey("AdminResponseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("AdminResponseMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AdminResponse"); + + b.Navigation("Media"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AssignAgg.Assign", b => + { + b.HasOne("AccountManagement.Domain.TaskAgg.Tasks", "Task") + .WithMany("Assigns") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("Task"); + }); + + modelBuilder.Entity("AccountManagement.Domain.CameraAccountAgg.CameraAccount", b => + { + b.HasOne("AccountManagement.Domain.AccountAgg.Account", "Account") + .WithMany("CameraAccounts") + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Account"); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b => + { + b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket") + .WithMany("ClientResponses") + .HasForeignKey("TicketId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Ticket"); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseMediaAgg.ClientResponseMedia", b => + { + b.HasOne("AccountManagement.Domain.ClientResponseAgg.ClientResponse", "ClientResponse") + .WithMany("ClientResponseMedias") + .HasForeignKey("ClientResponseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("ClientResponseMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClientResponse"); + + b.Navigation("Media"); + }); + + modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b => + { + b.OwnsMany("AccountManagement.Domain.RoleAgg.Permission", "Permissions", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("Code") + .HasColumnType("int"); + + b1.Property("RoleId") + .HasColumnType("bigint"); + + b1.HasKey("Id"); + + b1.HasIndex("RoleId"); + + b1.ToTable("RolePermissions", (string)null); + + b1.WithOwner("Role") + .HasForeignKey("RoleId"); + + b1.Navigation("Role"); + }); + + b.Navigation("Permissions"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskMediaAgg.TaskMedia", b => + { + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("TaskMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.TaskAgg.Tasks", "Tasks") + .WithMany("TaskMedias") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Media"); + + b.Navigation("Tasks"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketMediasAgg.TicketMedia", b => + { + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("TicketMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket") + .WithMany("TicketMedias") + .HasForeignKey("TicketId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Media"); + + b.Navigation("Ticket"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b => + { + b.Navigation("AccountLeftWorkList"); + + b.Navigation("CameraAccounts"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b => + { + b.Navigation("AdminResponseMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b => + { + b.Navigation("ClientResponseMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.MediaAgg.Media", b => + { + b.Navigation("AdminResponseMedias"); + + b.Navigation("ClientResponseMedias"); + + b.Navigation("TaskMedias"); + + b.Navigation("TicketMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b => + { + b.Navigation("Accounts"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b => + { + b.Navigation("Assigns"); + + b.Navigation("TaskMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketAgg.Ticket", b => + { + b.Navigation("AdminResponses"); + + b.Navigation("ClientResponses"); + + b.Navigation("TicketMedias"); + }); + + modelBuilder.Entity("TaskManager.Domain.PositionAgg.Position", b => + { + b.Navigation("Accounts"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/AccountMangement.Infrastructure.EFCore/Migrations/20240722150241_AccountLeftworkTable.cs b/AccountMangement.Infrastructure.EFCore/Migrations/20240722150241_AccountLeftworkTable.cs new file mode 100644 index 00000000..c5b5220b --- /dev/null +++ b/AccountMangement.Infrastructure.EFCore/Migrations/20240722150241_AccountLeftworkTable.cs @@ -0,0 +1,61 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace AccountMangement.Infrastructure.EFCore.Migrations +{ + /// + public partial class AccountLeftworkTable : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + + migrationBuilder.CreateTable( + name: "AccountLeftWork", + columns: table => new + { + id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + StartWorkGr = table.Column(type: "datetime2", nullable: false), + LeftWorkGr = table.Column(type: "datetime2", nullable: false), + AccountId = table.Column(type: "bigint", nullable: false), + CreationDate = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AccountLeftWork", x => x.id); + table.ForeignKey( + name: "FK_AccountLeftWork_Accounts_AccountId", + column: x => x.AccountId, + principalTable: "Accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + + + + + + migrationBuilder.CreateIndex( + name: "IX_AccountLeftWork_AccountId", + table: "AccountLeftWork", + column: "AccountId"); + + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + + migrationBuilder.DropTable( + name: "AccountLeftWork"); + + + } + } +} diff --git a/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs b/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs index 4fa3843f..0dcdbbb8 100644 --- a/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs +++ b/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs @@ -68,6 +68,10 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); + b.Property("PositionId") + .HasMaxLength(10) + .HasColumnType("bigint"); + b.Property("ProfilePhoto") .HasMaxLength(500) .HasColumnType("nvarchar(500)"); @@ -90,11 +94,116 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations b.HasKey("id"); + b.HasIndex("PositionId"); + b.HasIndex("RoleId"); b.ToTable("Accounts", (string)null); }); + modelBuilder.Entity("AccountManagement.Domain.AccountLeftWorkAgg.AccountLeftWork", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("LeftWorkGr") + .HasColumnType("datetime2"); + + b.Property("StartWorkGr") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.HasIndex("AccountId"); + + b.ToTable("AccountLeftWork", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Response") + .HasColumnType("ntext"); + + b.Property("TicketId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TicketId"); + + b.ToTable("AdminResponses", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseMediaAgg.AdminResponseMedia", b => + { + b.Property("AdminResponseId") + .HasColumnType("bigint"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.HasKey("AdminResponseId", "MediaId"); + + b.HasIndex("MediaId"); + + b.ToTable("AdminResponseMedias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.AssignAgg.Assign", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AssignedId") + .HasColumnType("bigint"); + + b.Property("AssignedName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("AssignedPositionValue") + .HasColumnType("int"); + + b.Property("AssignerId") + .HasColumnType("bigint"); + + b.Property("AssignerPositionValue") + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("TaskId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TaskId"); + + b.ToTable("Assigns", (string)null); + }); + modelBuilder.Entity("AccountManagement.Domain.CameraAccountAgg.CameraAccount", b => { b.Property("id") @@ -142,6 +251,72 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations b.ToTable("CameraAccounts", (string)null); }); + modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Response") + .HasColumnType("ntext"); + + b.Property("TicketId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TicketId"); + + b.ToTable("ClientResponses", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseMediaAgg.ClientResponseMedia", b => + { + b.Property("ClientResponseId") + .HasColumnType("bigint"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.HasKey("ClientResponseId", "MediaId"); + + b.HasIndex("MediaId"); + + b.ToTable("ClientResponseMedias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.MediaAgg.Media", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Category") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Path") + .HasColumnType("ntext"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.ToTable("Medias", (string)null); + }); + modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b => { b.Property("id") @@ -163,17 +338,264 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations b.ToTable("Roles", (string)null); }); + modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AcceptedTimeRequest") + .HasColumnType("int"); + + b.Property("CancelDescription") + .HasColumnType("ntext"); + + b.Property("ContractingPartyName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("ntext"); + + b.Property("DoneDescription") + .HasColumnType("ntext"); + + b.Property("EndTaskDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveString") + .HasMaxLength(7) + .HasColumnType("nvarchar(7)"); + + b.Property("IsCancel") + .HasColumnType("bit"); + + b.Property("IsCanceledRequest") + .HasColumnType("bit"); + + b.Property("IsDone") + .HasColumnType("bit"); + + b.Property("IsDoneRequest") + .HasColumnType("bit"); + + b.Property("RequestDate") + .HasColumnType("datetime2"); + + b.Property("SenderId") + .HasColumnType("bigint"); + + b.Property("StartTaskDate") + .HasColumnType("datetime2"); + + b.Property("TicketId") + .HasColumnType("bigint"); + + b.Property("TimeRequest") + .HasColumnType("bit"); + + b.Property("TimeRequestDescription") + .HasColumnType("ntext"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.ToTable("TasksManager", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskMediaAgg.TaskMedia", b => + { + b.Property("MediaId") + .HasColumnType("bigint"); + + b.Property("TaskId") + .HasColumnType("bigint"); + + b.HasKey("MediaId", "TaskId"); + + b.HasIndex("TaskId"); + + b.ToTable("TasksMedias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskSubjectAgg.TaskSubject", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.ToTable("TaskSubjects", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketAgg.Ticket", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractingPartyName") + .HasMaxLength(155) + .HasColumnType("nvarchar(155)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("ntext"); + + b.Property("SenderId") + .HasColumnType("bigint"); + + b.Property("Status") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("TaskId") + .HasColumnType("bigint"); + + b.Property("TicketType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Title") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("id"); + + b.ToTable("Tickets", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketMediasAgg.TicketMedia", b => + { + b.Property("TicketId") + .HasColumnType("bigint"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.HasKey("TicketId", "MediaId"); + + b.HasIndex("MediaId"); + + b.ToTable("TicketMedias", (string)null); + }); + + modelBuilder.Entity("TaskManager.Domain.PositionAgg.Position", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("PositionName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PositionValue") + .HasMaxLength(2) + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("Positions", (string)null); + }); + modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b => { + b.HasOne("TaskManager.Domain.PositionAgg.Position", "Position") + .WithMany("Accounts") + .HasForeignKey("PositionId"); + b.HasOne("AccountManagement.Domain.RoleAgg.Role", "Role") .WithMany("Accounts") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Position"); + b.Navigation("Role"); }); + modelBuilder.Entity("AccountManagement.Domain.AccountLeftWorkAgg.AccountLeftWork", b => + { + b.HasOne("AccountManagement.Domain.AccountAgg.Account", "Account") + .WithMany("AccountLeftWorkList") + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Account"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b => + { + b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket") + .WithMany("AdminResponses") + .HasForeignKey("TicketId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Ticket"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AdminResponseMediaAgg.AdminResponseMedia", b => + { + b.HasOne("AccountManagement.Domain.AdminResponseAgg.AdminResponse", "AdminResponse") + .WithMany("AdminResponseMedias") + .HasForeignKey("AdminResponseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("AdminResponseMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AdminResponse"); + + b.Navigation("Media"); + }); + + modelBuilder.Entity("AccountManagement.Domain.AssignAgg.Assign", b => + { + b.HasOne("AccountManagement.Domain.TaskAgg.Tasks", "Task") + .WithMany("Assigns") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("Task"); + }); + modelBuilder.Entity("AccountManagement.Domain.CameraAccountAgg.CameraAccount", b => { b.HasOne("AccountManagement.Domain.AccountAgg.Account", "Account") @@ -185,9 +607,39 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations b.Navigation("Account"); }); + modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b => + { + b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket") + .WithMany("ClientResponses") + .HasForeignKey("TicketId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Ticket"); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseMediaAgg.ClientResponseMedia", b => + { + b.HasOne("AccountManagement.Domain.ClientResponseAgg.ClientResponse", "ClientResponse") + .WithMany("ClientResponseMedias") + .HasForeignKey("ClientResponseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("ClientResponseMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClientResponse"); + + b.Navigation("Media"); + }); + modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b => { - b.OwnsMany("AccountManagement.Domain.RoleAgg.Permission", "Permissions", b1 => + b.OwnsMany("AccountManagement.Domain.RoleAgg.Role.Permissions#AccountManagement.Domain.RoleAgg.Permission", "Permissions", b1 => { b1.Property("Id") .ValueGeneratedOnAdd() @@ -216,15 +668,97 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations b.Navigation("Permissions"); }); + modelBuilder.Entity("AccountManagement.Domain.TaskMediaAgg.TaskMedia", b => + { + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("TaskMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.TaskAgg.Tasks", "Tasks") + .WithMany("TaskMedias") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Media"); + + b.Navigation("Tasks"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketMediasAgg.TicketMedia", b => + { + b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media") + .WithMany("TicketMedias") + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket") + .WithMany("TicketMedias") + .HasForeignKey("TicketId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Media"); + + b.Navigation("Ticket"); + }); + modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b => { + b.Navigation("AccountLeftWorkList"); + b.Navigation("CameraAccounts"); }); + modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b => + { + b.Navigation("AdminResponseMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b => + { + b.Navigation("ClientResponseMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.MediaAgg.Media", b => + { + b.Navigation("AdminResponseMedias"); + + b.Navigation("ClientResponseMedias"); + + b.Navigation("TaskMedias"); + + b.Navigation("TicketMedias"); + }); + modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b => { b.Navigation("Accounts"); }); + + modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b => + { + b.Navigation("Assigns"); + + b.Navigation("TaskMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketAgg.Ticket", b => + { + b.Navigation("AdminResponses"); + + b.Navigation("ClientResponses"); + + b.Navigation("TicketMedias"); + }); + + modelBuilder.Entity("TaskManager.Domain.PositionAgg.Position", b => + { + b.Navigation("Accounts"); + }); #pragma warning restore 612, 618 } } diff --git a/AccountMangement.Infrastructure.EFCore/Repository/AccountLeftworkRepository.cs b/AccountMangement.Infrastructure.EFCore/Repository/AccountLeftworkRepository.cs new file mode 100644 index 00000000..f51ddcb4 --- /dev/null +++ b/AccountMangement.Infrastructure.EFCore/Repository/AccountLeftworkRepository.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using _0_Framework.Application; +using _0_Framework.InfraStructure; +using AccountManagement.Application.Contracts.Account; +using AccountManagement.Domain.AccountLeftWorkAgg; +using Company.Domain.LeftWorkAgg; +using Company.Domain.WorkingHoursItemsAgg; +using Company.Domain.WorkshopAccountAgg; +using Microsoft.EntityFrameworkCore; + +namespace AccountMangement.Infrastructure.EFCore.Repository; + +public class AccountLeftworkRepository : RepositoryBase, IAccountLeftworkRepository +{ + private readonly AccountContext _accountContext; + private readonly IWorkshopAccountRepository _workshopAccountRepository; + + public AccountLeftworkRepository(AccountContext accountContext, IWorkshopAccountRepository workshopAccountRepository) : base(accountContext) + { + _accountContext = accountContext; + _workshopAccountRepository = workshopAccountRepository; + } + + public (string StartWorkFa, string LeftWorkFa) GetByAccountId(long accountId) + { + var initial = new DateTime(2150, 1, 1); + string start = ""; + string end = ""; + var res = _accountContext.AccountLeftWorks.FirstOrDefault(x => x.AccountId == accountId); + if (res != null) + { + start = res.StartWorkGr != initial ? res.StartWorkGr.ToFarsi() : ""; + end = res.LeftWorkGr != initial ? res.LeftWorkGr.ToFarsi() : ""; + } + + + return (start, end); + } + + public List WorkshopList(long accountId) + { + var res = _workshopAccountRepository.GetList(accountId); + return res.Select(x => new WorkshopAccountlistViewModel + { + WorkshopId = x.WorkshopId, + WorkshopName = x.WorkshopName, + AccountId = x.AccountId, + ContractAndCheckout = x.ContractAndCheckout, + Insurance = x.Insurance, + Tax = x.Tax, + IsActiveSting = x.IsActiveSting, + }).ToList(); + } +} \ No newline at end of file diff --git a/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs b/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs index 16e03e90..eb2f76b2 100644 --- a/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs +++ b/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs @@ -257,7 +257,24 @@ public class AccountRepository : RepositoryBase, IAccountReposito }).FirstOrDefault(x => x.Id == id); } + //public List GetAdminAccounts() + //{ + // return _context.Accounts.Where(x=>x.AdminAreaPermission == "true" && x.IsActiveString == "true").Select(x => new AccountViewModel() + // { + // Id = x.id, + // Fullname = x.Fullname, + // RoleName = x.RoleName, + // Username = x.Username, + // RoleId = x.RoleId, + // Mobile = x.Mobile, + // CreationDateGr = x.CreationDate, + // IsActiveString = x.IsActiveString, + + - #endregion + // }).ToList(); + //} + + #endregion } \ No newline at end of file diff --git a/Company.Domain/WorkshopAccountAgg/IWorkshopAccountRepository.cs b/Company.Domain/WorkshopAccountAgg/IWorkshopAccountRepository.cs new file mode 100644 index 00000000..23005556 --- /dev/null +++ b/Company.Domain/WorkshopAccountAgg/IWorkshopAccountRepository.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using _0_Framework.Domain; +using CompanyManagment.App.Contracts.Workshop; + +namespace Company.Domain.WorkshopAccountAgg; + +public interface IWorkshopAccountRepository: IRepository +{ + List GetList(long accountId); +} \ No newline at end of file diff --git a/Company.Domain/WorkshopAccountAgg/WorkshopAccount.cs b/Company.Domain/WorkshopAccountAgg/WorkshopAccount.cs index 869d101c..c7bdce4c 100644 --- a/Company.Domain/WorkshopAccountAgg/WorkshopAccount.cs +++ b/Company.Domain/WorkshopAccountAgg/WorkshopAccount.cs @@ -8,6 +8,9 @@ public class WorkshopAccount public long WorkshopId { get; set; } public Workshop Workshop { get; set; } public long AccountId { get; set; } + public string ContractAndCheckout { get; set; } + public string Insurance { get; set; } + public string Tax { get; set; } + public string IsActiveSting { get; set; } - } \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/Workshop/WorkshopAccountViewModel.cs b/CompanyManagment.App.Contracts/Workshop/WorkshopAccountViewModel.cs new file mode 100644 index 00000000..4ae5f0b3 --- /dev/null +++ b/CompanyManagment.App.Contracts/Workshop/WorkshopAccountViewModel.cs @@ -0,0 +1,12 @@ +namespace CompanyManagment.App.Contracts.Workshop; + +public class WorkshopAccountViewModel +{ + public long WorkshopId { get; set; } + public string WorkshopName { get; set; } + public long AccountId { get; set; } + public string ContractAndCheckout { get; set; } + public string Insurance { get; set; } + public string Tax { get; set; } + public string IsActiveSting { get; set; } +} \ No newline at end of file diff --git a/CompanyManagment.EFCore/Mapping/WorkshopAccountMapping.cs b/CompanyManagment.EFCore/Mapping/WorkshopAccountMapping.cs index cb6f5221..bdadece2 100644 --- a/CompanyManagment.EFCore/Mapping/WorkshopAccountMapping.cs +++ b/CompanyManagment.EFCore/Mapping/WorkshopAccountMapping.cs @@ -11,11 +11,15 @@ public class WorkshopAccountMapping : IEntityTypeConfiguration builder.ToTable("WorkshopeAccounts"); builder.HasKey(x => new { x.WorkshopId, x.AccountId }); - //builder.HasOne(x => x.Workshop) - // .WithMany(x => x.WorkshopAccounts) - // .HasForeignKey(x => x.WorkshopId); - //builder.HasOne(x => x.Account) - // .WithMany(x => x.WorkshopAccounts) - // .HasForeignKey(x => x.AccountId); - } + builder.Property(x => x.ContractAndCheckout).HasMaxLength(5); + builder.Property(x => x.Insurance).HasMaxLength(5); + builder.Property(x => x.Tax).HasMaxLength(5); + builder.Property(x => x.IsActiveSting).HasMaxLength(5); + //builder.HasOne(x => x.Workshop) + // .WithMany(x => x.WorkshopAccounts) + // .HasForeignKey(x => x.WorkshopId); + //builder.HasOne(x => x.Account) + // .WithMany(x => x.WorkshopAccounts) + // .HasForeignKey(x => x.AccountId); + } } \ No newline at end of file diff --git a/CompanyManagment.EFCore/Migrations/20240722142811_accessWorkshopAccount.Designer.cs b/CompanyManagment.EFCore/Migrations/20240722142811_accessWorkshopAccount.Designer.cs new file mode 100644 index 00000000..dec3f393 --- /dev/null +++ b/CompanyManagment.EFCore/Migrations/20240722142811_accessWorkshopAccount.Designer.cs @@ -0,0 +1,5588 @@ +// +using System; +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("20240722142811_accessWorkshopAccount")] + partial class accessWorkshopAccount + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + 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("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("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("OvertimePay") + .HasColumnType("float"); + + b.Property("PersonnelCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("RewardPay") + .HasColumnType("float"); + + 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("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("FName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IdNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + 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.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("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("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.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.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.EmployeeInsurancListDataAgg.EmployeeInsurancListData", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BenefitsIncludedContinuous") + .HasColumnType("float"); + + b.Property("BenefitsIncludedNonContinuous") + .HasColumnType("float"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DailyWage") + .HasColumnType("float"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + 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("MonthlyBenefits") + .HasColumnType("float"); + + b.Property("MonthlyBenefitsIncluded") + .HasColumnType("float"); + + b.Property("MonthlySalary") + .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.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") + .HasColumnType("nvarchar(max)"); + + 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.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("InsuranceJobId") + .HasColumnType("bigint"); + + b.Property("PercentageLessThan") + .HasColumnType("float"); + + b.Property("PercentageMoreThan") + .HasColumnType("float"); + + b.Property("SalaeyLessThan") + .HasColumnType("float"); + + b.Property("SalaryMoreThan") + .HasColumnType("float"); + + 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("SumOfBenefitsIncluded") + .HasColumnType("float"); + + b.Property("SumOfDailyWage") + .HasColumnType("float"); + + b.Property("SumOfEmployees") + .HasColumnType("int"); + + 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.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("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("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.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.RollCallAgg.RollCall", 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("EndDate") + .HasColumnType("datetime2"); + + b.Property("Month") + .HasColumnType("int"); + + 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("HasUploadedImage") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("RollCallEmployees", (string)null); + }); + + 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("Duration") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("EndService") + .HasColumnType("datetime2"); + + 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("AccountId"); + + b.ToTable("RollCallServices", (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.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("Checkout") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Contract") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Insurance") + .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("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("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.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.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.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.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.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.RollCallServiceAgg.RollCallService", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("RollCallServicesList") + .HasForeignKey("AccountId") + .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.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.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.DateSalaryAgg.DateSalary", b => + { + b.Navigation("DateSalaryItemList"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeAgg.Employee", b => + { + b.Navigation("ClientEmployeeWorkshopList"); + + b.Navigation("Contracts"); + + b.Navigation("EmployeeChildrenList"); + + b.Navigation("EmployeeInsuranceRecords"); + + b.Navigation("InsuranceEmployeeInfo"); + + b.Navigation("LeftWorkInsurances"); + + b.Navigation("LeftWorks"); + + b.Navigation("PersonnelCodeList"); + }); + + 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.SubtitleAgg.EntitySubtitle", b => + { + b.Navigation("Chapters"); + + b.Navigation("Subtitles"); + }); + + modelBuilder.Entity("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", b => + { + b.Navigation("TaxLeftWorkItemList"); + }); + + 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("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"); + }); + + 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/20240722142811_accessWorkshopAccount.cs b/CompanyManagment.EFCore/Migrations/20240722142811_accessWorkshopAccount.cs new file mode 100644 index 00000000..35022bf3 --- /dev/null +++ b/CompanyManagment.EFCore/Migrations/20240722142811_accessWorkshopAccount.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace CompanyManagment.EFCore.Migrations +{ + /// + public partial class accessWorkshopAccount : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Checkout", + table: "WorkshopeAccounts", + type: "nvarchar(5)", + maxLength: 5, + nullable: true); + + migrationBuilder.AddColumn( + name: "Contract", + table: "WorkshopeAccounts", + type: "nvarchar(5)", + maxLength: 5, + nullable: true); + + migrationBuilder.AddColumn( + name: "Insurance", + table: "WorkshopeAccounts", + type: "nvarchar(5)", + maxLength: 5, + nullable: true); + + migrationBuilder.AddColumn( + name: "Tax", + table: "WorkshopeAccounts", + type: "nvarchar(5)", + maxLength: 5, + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Checkout", + table: "WorkshopeAccounts"); + + migrationBuilder.DropColumn( + name: "Contract", + table: "WorkshopeAccounts"); + + migrationBuilder.DropColumn( + name: "Insurance", + table: "WorkshopeAccounts"); + + migrationBuilder.DropColumn( + name: "Tax", + table: "WorkshopeAccounts"); + } + } +} diff --git a/CompanyManagment.EFCore/Migrations/20240722175337_WorkshopAccountEdted.Designer.cs b/CompanyManagment.EFCore/Migrations/20240722175337_WorkshopAccountEdted.Designer.cs new file mode 100644 index 00000000..acb60df4 --- /dev/null +++ b/CompanyManagment.EFCore/Migrations/20240722175337_WorkshopAccountEdted.Designer.cs @@ -0,0 +1,5588 @@ +// +using System; +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("20240722175337_WorkshopAccountEdted")] + partial class WorkshopAccountEdted + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + 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("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("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("OvertimePay") + .HasColumnType("float"); + + b.Property("PersonnelCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("RewardPay") + .HasColumnType("float"); + + 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("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("FName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IdNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + 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.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("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("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.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.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.EmployeeInsurancListDataAgg.EmployeeInsurancListData", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("BenefitsIncludedContinuous") + .HasColumnType("float"); + + b.Property("BenefitsIncludedNonContinuous") + .HasColumnType("float"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DailyWage") + .HasColumnType("float"); + + b.Property("EmployeeId") + .HasColumnType("bigint"); + + 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("MonthlyBenefits") + .HasColumnType("float"); + + b.Property("MonthlyBenefitsIncluded") + .HasColumnType("float"); + + b.Property("MonthlySalary") + .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.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") + .HasColumnType("nvarchar(max)"); + + 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.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("InsuranceJobId") + .HasColumnType("bigint"); + + b.Property("PercentageLessThan") + .HasColumnType("float"); + + b.Property("PercentageMoreThan") + .HasColumnType("float"); + + b.Property("SalaeyLessThan") + .HasColumnType("float"); + + b.Property("SalaryMoreThan") + .HasColumnType("float"); + + 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("SumOfBenefitsIncluded") + .HasColumnType("float"); + + b.Property("SumOfDailyWage") + .HasColumnType("float"); + + b.Property("SumOfEmployees") + .HasColumnType("int"); + + 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.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("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("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.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.RollCallAgg.RollCall", 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("EndDate") + .HasColumnType("datetime2"); + + b.Property("Month") + .HasColumnType("int"); + + 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("HasUploadedImage") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.ToTable("RollCallEmployees", (string)null); + }); + + 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("Duration") + .HasMaxLength(2) + .HasColumnType("nvarchar(2)"); + + b.Property("EndService") + .HasColumnType("datetime2"); + + 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("AccountId"); + + b.ToTable("RollCallServices", (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.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("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("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.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.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.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.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.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.RollCallServiceAgg.RollCallService", b => + { + b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop") + .WithMany("RollCallServicesList") + .HasForeignKey("AccountId") + .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.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.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.DateSalaryAgg.DateSalary", b => + { + b.Navigation("DateSalaryItemList"); + }); + + modelBuilder.Entity("Company.Domain.EmployeeAgg.Employee", b => + { + b.Navigation("ClientEmployeeWorkshopList"); + + b.Navigation("Contracts"); + + b.Navigation("EmployeeChildrenList"); + + b.Navigation("EmployeeInsuranceRecords"); + + b.Navigation("InsuranceEmployeeInfo"); + + b.Navigation("LeftWorkInsurances"); + + b.Navigation("LeftWorks"); + + b.Navigation("PersonnelCodeList"); + }); + + 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.SubtitleAgg.EntitySubtitle", b => + { + b.Navigation("Chapters"); + + b.Navigation("Subtitles"); + }); + + modelBuilder.Entity("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", b => + { + b.Navigation("TaxLeftWorkItemList"); + }); + + 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("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"); + }); + + 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/20240722175337_WorkshopAccountEdted.cs b/CompanyManagment.EFCore/Migrations/20240722175337_WorkshopAccountEdted.cs new file mode 100644 index 00000000..e1428a0f --- /dev/null +++ b/CompanyManagment.EFCore/Migrations/20240722175337_WorkshopAccountEdted.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace CompanyManagment.EFCore.Migrations +{ + /// + public partial class WorkshopAccountEdted : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Contract", + table: "WorkshopeAccounts", + newName: "IsActiveSting"); + + migrationBuilder.RenameColumn( + name: "Checkout", + table: "WorkshopeAccounts", + newName: "ContractAndCheckout"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "IsActiveSting", + table: "WorkshopeAccounts", + newName: "Contract"); + + migrationBuilder.RenameColumn( + name: "ContractAndCheckout", + table: "WorkshopeAccounts", + newName: "Checkout"); + } + } +} diff --git a/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs b/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs index ba3eec26..15f9987b 100644 --- a/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs +++ b/CompanyManagment.EFCore/Migrations/CompanyContextModelSnapshot.cs @@ -3983,6 +3983,22 @@ namespace CompanyManagment.EFCore.Migrations 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); diff --git a/CompanyManagment.EFCore/Repository/WorkshopAccountRepository.cs b/CompanyManagment.EFCore/Repository/WorkshopAccountRepository.cs new file mode 100644 index 00000000..c5109501 --- /dev/null +++ b/CompanyManagment.EFCore/Repository/WorkshopAccountRepository.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using _0_Framework.InfraStructure; +using Company.Domain.WorkshopAccountAgg; +using CompanyManagment.App.Contracts.Workshop; +using Microsoft.EntityFrameworkCore; + +namespace CompanyManagment.EFCore.Repository; + +public class WorkshopAccountRepository : RepositoryBase, IWorkshopAccountRepository +{ + private readonly CompanyContext _Context; + public WorkshopAccountRepository(CompanyContext context) : base(context) + { + _Context = context; + + } + + [SuppressMessage("ReSharper.DPA", "DPA0007: Large number of DB records", MessageId = "count: 509")] + public List GetList(long accountId) + { + return _Context.WorkshopAccounts.Include(x=>x.Workshop).Where(x => x.AccountId == accountId).Select(x => new WorkshopAccountViewModel() + { + WorkshopId = x.WorkshopId, + AccountId = x.AccountId, + ContractAndCheckout = x.ContractAndCheckout, + Insurance = x.Insurance, + Tax = x.Tax, + IsActiveSting = x.IsActiveSting, + WorkshopName = x.Workshop.WorkshopFullName, + + + }).ToList(); + } +} \ No newline at end of file diff --git a/PersonalContractingParty.Config/PersonalBootstrapper.cs b/PersonalContractingParty.Config/PersonalBootstrapper.cs index ef52c434..40d0a944 100644 --- a/PersonalContractingParty.Config/PersonalBootstrapper.cs +++ b/PersonalContractingParty.Config/PersonalBootstrapper.cs @@ -161,6 +161,7 @@ using CompanyManagment.App.Contracts.RollCallService; using CompanyManagment.App.Contracts.RollCallPlan; using Company.Domain.ReportClientAgg; using Company.Domain.TaxJobCategoryAgg; +using Company.Domain.WorkshopAccountAgg; using CompanyManagment.App.Contracts.ReportClient; using CompanyManagment.App.Contracts.TaxJobCategory; @@ -344,7 +345,7 @@ public class PersonalBootstrapper services.AddTransient(); services.AddTransient(); - + services.AddTransient(); //=========End Of Main==================================== //---File Project------------------------------------ diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/AccountLeftWork.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/AccountLeftWork.cshtml new file mode 100644 index 00000000..5ea8e18f --- /dev/null +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/AccountLeftWork.cshtml @@ -0,0 +1,313 @@ +@model AccountManagement.Application.Contracts.Account.AccountLeftWorkViewModel +@{ + + +} + + + +
+
+ کپی کارگاه ها به  : + + + تایید + +
+ +
+ ترک کار  : + +
+
+ شروع بکار  : + +
+ +
+ +
+ +
+
+
+ -- +
+
+ بیمه +
+ +
+ مالیات +
+
+ قرداد و تصفیه +
+
+ + +
+
+ نام کارگاه + +
+
+ +
+ + @foreach (var item in @Model.WorkshopAccountlist) + { +
+ +
+ +
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+ + + + +
+
+ @item.WorkshopName + +
+
+ } + +
+ + + + diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml index 1b98545c..b21d6a4e 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml @@ -243,6 +243,10 @@ href="#showmodal=@Url.Page("./Index", "Edit", new { item.Id })"> + + + @if (item.IsActiveString == "true" && item.Role != "مدیر سیستم") { diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml.cs index 2aa12722..5bd41b5a 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml.cs +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml.cs @@ -208,4 +208,13 @@ public class IndexModel : PageModel isSuccess = false }); } + + public IActionResult OnGetAccountWorkshop(long id) + { + var res = _accountApplication.WorkshopList(id); + + + + return Partial("AccountLeftWork", res); + } } \ No newline at end of file diff --git a/ServiceHost/Areas/Client/Pages/Index.cshtml b/ServiceHost/Areas/Client/Pages/Index.cshtml index b21ab748..4ac6a976 100644 --- a/ServiceHost/Areas/Client/Pages/Index.cshtml +++ b/ServiceHost/Areas/Client/Pages/Index.cshtml @@ -1,8 +1,9 @@ @page @using Version = _0_Framework.Application.Version -@model IndexModel +@model ServiceHost.Areas.Client.Pages.IndexModel @{ + @@ -11,47 +12,47 @@
-
-
-
-
-
-
-
-

به سامانه گزارشگیر خوش آمدید

-
خوش آمدید به دنیای پرانرژی سامانه هوشمند مدیریت منابع انسانی. ما خوشحالیم که شما را در اینجا می‌بینیم.
-
-
- -
-
-
-
-
-
-
-
تقویم
-
+
+
+
+
+
+
+
+

به سامانه گزارشگیر خوش آمدید

+
خوش آمدید به دنیای پرانرژی سامانه هوشمند مدیریت منابع انسانی. ما خوشحالیم که شما را در اینجا می‌بینیم.
+
+
+ +
+
+
+
+
+
+
+
تقویم
+
-
-
@Model.TodayDate
-
-
+
+
@Model.TodayDate
+
+
-
- @foreach (var calender in Model.CalenderViewModels) - { -
-

@calender.DayOfWeek

-

@calender.DayNumber

- @*

@calender.Holiday

*@ -
- } -
-
-
- - @*
+
+ @foreach (var calender in @Model.CalenderViewModels) + { +
+

@calender.DayOfWeek

+

@calender.DayNumber

+ @*

@calender.Holiday

*@ +
+ } +
+
+
+ + @*
@@ -69,47 +70,47 @@
*@ - -
-
-
-
- - -
-
-
-
- - @*
+ +
+
+
+
+ + +
+
+
+
+ +@*
@@ -124,73 +125,72 @@
*@ - + -
-
+
+
@section Script { - + - + var hasCompletedDashboardTour = localStorage.getItem('hasCompletedDashboardTour'); + if (!hasCompletedDashboardTour) { + introJs().setOptions({ + nextLabel: 'بعد', + prevLabel: 'قبل', + doneLabel: 'اتمام', + showBullets: false, + steps: [ + { + title: 'خوش آمدید به سامانه گزارشگیر 👋', + intro: 'برای آموزش این صفحه با ما همراه باشید.' + }, + { + title: 'عملیات مربوط به مرخصی', + element: document.querySelector('#btnCardLeaveIntro'), + intro: 'برای عملیات دسترسی سریع دکمه‌های مربوط به مرخصی مانند ثبت مرخصی و لیست مرخصی میتوانید از این روش استفاده نمایید.' + } + ] + }).start(); + localStorage.setItem('hasCompletedDashboardTour', true); + } + } \ No newline at end of file diff --git a/ServiceHost/ServiceHost.csproj b/ServiceHost/ServiceHost.csproj index a54c80a5..6ae30950 100644 --- a/ServiceHost/ServiceHost.csproj +++ b/ServiceHost/ServiceHost.csproj @@ -2565,4 +2565,12 @@ --> + + + + + + <_ContentIncludedByDefault Remove="Areas\Admin\Pages\Accounts\Account\AccountLeftWork.cshtml" /> + + diff --git a/ServiceHost/appsettings.Development.json b/ServiceHost/appsettings.Development.json index d6187eef..16234f8d 100644 --- a/ServiceHost/appsettings.Development.json +++ b/ServiceHost/appsettings.Development.json @@ -12,10 +12,10 @@ //"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True" //server - "MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170][3019]#@ATt;TrustServerCertificate=true;" + //"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170][3019]#@ATt;TrustServerCertificate=true;" //local - //"MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;" + "MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;" }, "GoogleRecaptchaV3": { "SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",