diff --git a/AccountManagement.Domain/TaskScheduleAgg/TaskSchedule.cs b/AccountManagement.Domain/TaskScheduleAgg/TaskSchedule.cs index 6f54d275..d7ac1550 100644 --- a/AccountManagement.Domain/TaskScheduleAgg/TaskSchedule.cs +++ b/AccountManagement.Domain/TaskScheduleAgg/TaskSchedule.cs @@ -16,14 +16,14 @@ public class TaskSchedule:EntityBase UnitType = unitType; UnitNumber = unitNumber; LastEndTaskDate = lastEndTaskDate; - IsCanceled = IsActive.True; + IsActive = IsActive.False; } public string Count { get; private set; } public TaskScheduleType Type { get; private set; } public TaskScheduleUnitType UnitType { get; private set; } public string UnitNumber { get; private set; } public DateTime LastEndTaskDate { get; private set; } - public IsActive IsCanceled { get; private set; } + public IsActive IsActive { get; private set; } public List TasksList { get; set; } public void SetLastEndTaskDate(DateTime lastEndTaskDate) @@ -33,6 +33,6 @@ public class TaskSchedule:EntityBase public void DeActive() { - IsCanceled = IsActive.False; + IsActive = IsActive.False; } } \ No newline at end of file diff --git a/AccountMangement.Infrastructure.EFCore/Mappings/TaskScheduleMapping.cs b/AccountMangement.Infrastructure.EFCore/Mappings/TaskScheduleMapping.cs index ff388549..d8d2efe2 100644 --- a/AccountMangement.Infrastructure.EFCore/Mappings/TaskScheduleMapping.cs +++ b/AccountMangement.Infrastructure.EFCore/Mappings/TaskScheduleMapping.cs @@ -15,7 +15,7 @@ public class TaskScheduleMapping : IEntityTypeConfiguration builder.Property(x => x.Type).HasConversion().HasMaxLength(12); builder.Property(x => x.UnitNumber).HasMaxLength(10); builder.Property(x => x.UnitType).HasConversion().HasMaxLength(10); - builder.Property(x => x.IsCanceled).HasConversion().HasMaxLength(5); + builder.Property(x => x.IsActive).HasConversion().HasMaxLength(5); builder.HasMany(x => x.TasksList).WithOne(x => x.TaskSchedule) .HasForeignKey(x => x.TaskScheduleId); diff --git a/AccountMangement.Infrastructure.EFCore/Migrations/20250416121822_taskSchedule rename isActive.Designer.cs b/AccountMangement.Infrastructure.EFCore/Migrations/20250416121822_taskSchedule rename isActive.Designer.cs new file mode 100644 index 00000000..bb8c382a --- /dev/null +++ b/AccountMangement.Infrastructure.EFCore/Migrations/20250416121822_taskSchedule rename isActive.Designer.cs @@ -0,0 +1,1274 @@ +// +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("20250416121822_taskSchedule rename isActive")] + partial class taskSchedulerenameisActive + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("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("PositionIsActive") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + 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("IsActive") + .HasColumnType("bit"); + + b.Property("LeftWorkGr") + .HasColumnType("datetime2"); + + b.Property("RoleId") + .HasColumnType("bigint"); + + b.Property("StartWorkGr") + .HasColumnType("datetime2"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + 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("AdminAccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActiveString") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + 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("AcceptedTimeRequest") + .HasColumnType("int"); + + 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("CancelDescription") + .HasColumnType("ntext"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DoneDescription") + .HasColumnType("ntext"); + + b.Property("EndTaskDate") + .HasColumnType("datetime2"); + + b.Property("FirstTimeCreation") + .HasColumnType("bit"); + + 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("TaskId") + .HasColumnType("bigint"); + + b.Property("TimeRequest") + .HasColumnType("bit"); + + b.Property("TimeRequestDescription") + .HasColumnType("ntext"); + + 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("ServiceName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.ToTable("Medias", (string)null); + }); + + modelBuilder.Entity("AccountManagement.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.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.SubAccountAgg.SubAccount", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("FName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("NationalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("ProfilePhoto") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("SubAccountRoleId") + .HasColumnType("bigint"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("VerifyCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.HasIndex("SubAccountRoleId"); + + b.ToTable("SubAccounts", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle1Agg.SubAccountPermissionSubtitle1", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Code") + .HasMaxLength(15) + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.ToTable("SubAccountPermissionSubtitle1", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle2Agg.SubAccountPermissionSubtitle2", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Code") + .HasMaxLength(15) + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.HasIndex("ParentId"); + + b.ToTable("SubAccountPermissionSubtitle2", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle3Agg.SubAccountPermissionSubtitle3", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Code") + .HasMaxLength(15) + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.HasIndex("ParentId"); + + b.ToTable("SubAccountPermissionSubtitle3", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle4Agg.SubAccountPermissionSubtitle4", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Code") + .HasMaxLength(15) + .HasColumnType("int"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("id"); + + b.HasIndex("ParentId"); + + b.ToTable("SubAccountPermissionSubtitle4", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountRoleAgg.SubAccountRole", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Title") + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); + + b.HasKey("id"); + + b.ToTable("SubAccountRoles", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("ContractingPartyName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("ntext"); + + b.Property("IsActiveString") + .HasMaxLength(7) + .HasColumnType("nvarchar(7)"); + + b.Property("SenderId") + .HasColumnType("bigint"); + + b.Property("StartTaskDate") + .HasColumnType("datetime2"); + + b.Property("TaskScheduleId") + .HasColumnType("bigint"); + + b.Property("TicketId") + .HasColumnType("bigint"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("id"); + + b.HasIndex("TaskScheduleId"); + + 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.TaskMessageAgg.TaskMessage", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AssignId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Message") + .HasColumnType("ntext"); + + b.Property("RequestedDateFa") + .HasMaxLength(25) + .HasColumnType("nvarchar(25)"); + + b.Property("TypeOfMessage") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.HasKey("id"); + + b.HasIndex("AssignId"); + + b.ToTable("TaskMessages", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskMessageItemsAgg.TaskMessageItems", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ReceiverAccountId") + .HasColumnType("bigint"); + + b.Property("SenderAccountId") + .HasColumnType("bigint"); + + b.Property("TaskMessageId") + .HasColumnType("bigint"); + + b.HasKey("id"); + + b.HasIndex("TaskMessageId"); + + b.ToTable("TaskMessageItems", (string)null); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskScheduleAgg.TaskSchedule", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("Count") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("LastEndTaskDate") + .HasColumnType("datetime2"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.Property("UnitNumber") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("UnitType") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("id"); + + b.ToTable("TaskSchedules", (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.TicketAccessAccountAgg.TicketAccessAccount", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.HasKey("id"); + + b.ToTable("TicketAccessAccounts", (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("IsDeleted") + .HasColumnType("bit"); + + b.Property("SenderId") + .HasColumnType("bigint"); + + b.Property("Status") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("SubAccountSenderId") + .HasColumnType("bigint"); + + b.Property("TicketNumber") + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.Property("TicketType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Title") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("WorkshopId") + .HasColumnType("bigint"); + + 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("AccountManagement.Domain.AccountAgg.Account", b => + { + b.HasOne("AccountManagement.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.SubAccountAgg.SubAccount", b => + { + b.HasOne("AccountManagement.Domain.SubAccountRoleAgg.SubAccountRole", "SubAccountRole") + .WithMany("SubAccounts") + .HasForeignKey("SubAccountRoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SubAccountRole"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle2Agg.SubAccountPermissionSubtitle2", b => + { + b.HasOne("AccountManagement.Domain.SubAccountPermissionSubtitle1Agg.SubAccountPermissionSubtitle1", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle3Agg.SubAccountPermissionSubtitle3", b => + { + b.HasOne("AccountManagement.Domain.SubAccountPermissionSubtitle2Agg.SubAccountPermissionSubtitle2", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle4Agg.SubAccountPermissionSubtitle4", b => + { + b.HasOne("AccountManagement.Domain.SubAccountPermissionSubtitle3Agg.SubAccountPermissionSubtitle3", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountRoleAgg.SubAccountRole", b => + { + b.OwnsMany("AccountManagement.Domain.SubAccountRoleAgg.SubAccountRolePermission", "RolePermissions", b1 => + { + b1.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("id")); + + b1.Property("PermissionCode") + .HasColumnType("int"); + + b1.Property("SubAccountRoleId") + .HasColumnType("bigint"); + + b1.HasKey("id"); + + b1.HasIndex("SubAccountRoleId"); + + b1.ToTable("SubAccountRolePermissions", (string)null); + + b1.WithOwner("SubAccountRole") + .HasForeignKey("SubAccountRoleId"); + + b1.Navigation("SubAccountRole"); + }); + + b.Navigation("RolePermissions"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b => + { + b.HasOne("AccountManagement.Domain.TaskScheduleAgg.TaskSchedule", "TaskSchedule") + .WithMany("TasksList") + .HasForeignKey("TaskScheduleId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TaskSchedule"); + }); + + 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.TaskMessageAgg.TaskMessage", b => + { + b.HasOne("AccountManagement.Domain.AssignAgg.Assign", "Assign") + .WithMany("TaskMessageList") + .HasForeignKey("AssignId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Assign"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskMessageItemsAgg.TaskMessageItems", b => + { + b.HasOne("AccountManagement.Domain.TaskMessageAgg.TaskMessage", "TaskMessage") + .WithMany("TaskMessageItemsList") + .HasForeignKey("TaskMessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TaskMessage"); + }); + + 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.AssignAgg.Assign", b => + { + b.Navigation("TaskMessageList"); + }); + + 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.PositionAgg.Position", b => + { + b.Navigation("Accounts"); + }); + + modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b => + { + b.Navigation("Accounts"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle1Agg.SubAccountPermissionSubtitle1", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle2Agg.SubAccountPermissionSubtitle2", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountPermissionSubtitle3Agg.SubAccountPermissionSubtitle3", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("AccountManagement.Domain.SubAccountRoleAgg.SubAccountRole", b => + { + b.Navigation("SubAccounts"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b => + { + b.Navigation("Assigns"); + + b.Navigation("TaskMedias"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskMessageAgg.TaskMessage", b => + { + b.Navigation("TaskMessageItemsList"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TaskScheduleAgg.TaskSchedule", b => + { + b.Navigation("TasksList"); + }); + + modelBuilder.Entity("AccountManagement.Domain.TicketAgg.Ticket", b => + { + b.Navigation("AdminResponses"); + + b.Navigation("ClientResponses"); + + b.Navigation("TicketMedias"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/AccountMangement.Infrastructure.EFCore/Migrations/20250416121822_taskSchedule rename isActive.cs b/AccountMangement.Infrastructure.EFCore/Migrations/20250416121822_taskSchedule rename isActive.cs new file mode 100644 index 00000000..ca1e230d --- /dev/null +++ b/AccountMangement.Infrastructure.EFCore/Migrations/20250416121822_taskSchedule rename isActive.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace AccountMangement.Infrastructure.EFCore.Migrations +{ + /// + public partial class taskSchedulerenameisActive : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "IsCanceled", + table: "TaskSchedules", + newName: "IsActive"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "IsActive", + table: "TaskSchedules", + newName: "IsCanceled"); + } + } +} diff --git a/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs b/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs index 3770c043..153816a2 100644 --- a/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs +++ b/AccountMangement.Infrastructure.EFCore/Migrations/AccountContextModelSnapshot.cs @@ -759,7 +759,7 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations b.Property("CreationDate") .HasColumnType("datetime2"); - b.Property("IsCanceled") + b.Property("IsActive") .IsRequired() .HasMaxLength(5) .HasColumnType("nvarchar(5)");