From 6b81f383f6dd40e756da9e54a7270dfedf022db2 Mon Sep 17 00:00:00 2001 From: gozareshgir Date: Tue, 27 Jan 2026 17:49:29 +0330 Subject: [PATCH 1/5] change after merge --- .../ProjectAgg/Entities/BugSection.cs | 1 + .../ProjectAgg/Entities/Task/ProjectTask.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/BugSection.cs b/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/BugSection.cs index cbb79db8..ccb2bfac 100644 --- a/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/BugSection.cs +++ b/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/BugSection.cs @@ -1,4 +1,5 @@ using GozareshgirProgramManager.Domain._Common; +using GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task; using GozareshgirProgramManager.Domain.ProjectAgg.Enums; namespace GozareshgirProgramManager.Domain.ProjectAgg.Entities; diff --git a/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/Task/ProjectTask.cs b/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/Task/ProjectTask.cs index 617b5b1f..685a4574 100644 --- a/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/Task/ProjectTask.cs +++ b/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/ProjectAgg/Entities/Task/ProjectTask.cs @@ -19,7 +19,7 @@ public class ProjectTask : ProjectHierarchyNode public ProjectTask(string name, Guid phaseId,ProjectTaskPriority priority, string? description = null) : base(name, description) { PhaseId = phaseId; - _sections = new List(); + _sections = new List(); BugSectionList = new List(); Priority = priority; AddDomainEvent(new TaskCreatedEvent(Id, phaseId, name)); @@ -27,7 +27,7 @@ public class ProjectTask : ProjectHierarchyNode public Guid PhaseId { get; private set; } public ProjectPhase Phase { get; private set; } = null!; - public IReadOnlyList Sections => _sections.AsReadOnly(); + public IReadOnlyList Sections => _sections.AsReadOnly(); public List BugSectionList { get; set; } // Task-specific properties From 34d336f43e8570035488c6cbb85cc35f17dd212e Mon Sep 17 00:00:00 2001 From: gozareshgir Date: Tue, 27 Jan 2026 18:39:59 +0330 Subject: [PATCH 2/5] add bugsection Workflow --- .../Providers/BugSectionWorkflowProvider.cs | 32 +++++++++++++++++++ .../Queries/WorkflowList/WorkflowListQuery.cs | 6 ++-- .../FileManagementAgg/Enums/FileCategory.cs | 1 + ServiceHost/Properties/launchSettings.json | 2 +- 4 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/Providers/BugSectionWorkflowProvider.cs diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/Providers/BugSectionWorkflowProvider.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/Providers/BugSectionWorkflowProvider.cs new file mode 100644 index 00000000..f3366bda --- /dev/null +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/Providers/BugSectionWorkflowProvider.cs @@ -0,0 +1,32 @@ +using GozareshgirProgramManager.Application._Common.Interfaces; +using GozareshgirProgramManager.Domain.ProjectAgg.Enums; +using Microsoft.EntityFrameworkCore; + +namespace GozareshgirProgramManager.Application.Modules.Workflows.Queries.WorkflowList.Providers; + +public class BugSectionWorkflowProvider : IWorkflowProvider +{ + public WorkflowType Type => WorkflowType.BugSection; + public async Task> GetItems(long currentUserId, IProgramManagerDbContext context, CancellationToken cancellationToken) + { + var bugs =context.BugSections + .Where(b=>b.Status == TaskSectionStatus.ReadyToStart) + .Include(x => x.ProjectTask).AsNoTracking(); + + return await bugs.Select(x => new WorkflowListItem + { + EntityId = x.Id, + Title = x.ProjectTask.Name, + Type = WorkflowType.BugSection + }).ToListAsync(cancellationToken); + + } + + public async Task GetCount(long currentUserId, IProgramManagerDbContext context, CancellationToken cancellationToken) + { + var query = context.BugSections + .Where(b => b.Status == TaskSectionStatus.ReadyToStart); + + return await query.CountAsync(cancellationToken); + } +} \ No newline at end of file diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowListQuery.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowListQuery.cs index 18ee2e60..e50be2b4 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowListQuery.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowListQuery.cs @@ -19,6 +19,7 @@ public enum WorkflowType Rejected, NotAssigned, PendingForApproval, + BugSection, } public record WorkflowListQuery():IBaseQuery; @@ -42,7 +43,7 @@ public class WorkflowListQueryHandler:IBaseQueryHandler(); - + var response = new WorkflowListResponse(items); foreach (var provider in _providers) { var providerItems = await provider.GetItems(currentUserId, _context, cancellationToken); @@ -50,7 +51,6 @@ public class WorkflowListQueryHandler:IBaseQueryHandler.Success(res); + return OperationResult.Success(response); } } \ No newline at end of file diff --git a/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/FileManagementAgg/Enums/FileCategory.cs b/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/FileManagementAgg/Enums/FileCategory.cs index 3bb774d5..176e68fb 100644 --- a/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/FileManagementAgg/Enums/FileCategory.cs +++ b/ProgramManager/src/Domain/GozareshgirProgramManager.Domain/FileManagementAgg/Enums/FileCategory.cs @@ -12,5 +12,6 @@ public enum FileCategory Report = 5, // گزارش Other = 6, // سایر BugSection = 7, // تسک باگ + TaskSectionRevision } diff --git a/ServiceHost/Properties/launchSettings.json b/ServiceHost/Properties/launchSettings.json index 18aaf56a..7a417116 100644 --- a/ServiceHost/Properties/launchSettings.json +++ b/ServiceHost/Properties/launchSettings.json @@ -19,7 +19,7 @@ "sqlDebugging": true, "dotnetRunMessages": "true", "nativeDebugging": true, - "applicationUrl": "https://localhost:5004;http://localhost:5003;https://192.168.0.117:5006", + "applicationUrl": "https://localhost:5004;http://localhost:5003;", "jsWebView2Debugging": false, "hotReloadEnabled": true }, From d6a9c5e87de59f18bc465eac353a3af6e8062891 Mon Sep 17 00:00:00 2001 From: mahan Date: Tue, 27 Jan 2026 18:48:00 +0330 Subject: [PATCH 3/5] remove mig --- .../20260127100843_BugSectioninit.Designer.cs | 1149 ----------------- .../20260127100843_BugSectioninit.cs | 77 -- .../Migrations/AppDbContextModelSnapshot.cs | 78 +- 3 files changed, 2 insertions(+), 1302 deletions(-) delete mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.Designer.cs delete mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.cs diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.Designer.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.Designer.cs deleted file mode 100644 index 40edf85e..00000000 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.Designer.cs +++ /dev/null @@ -1,1149 +0,0 @@ -// -using System; -using GozareshgirProgramManager.Infrastructure.Persistence.Context; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace GozareshgirProgramManager.Infrastructure.Migrations -{ - [DbContext(typeof(ProgramManagerDbContext))] - [Migration("20260127100843_BugSectioninit")] - partial class BugSectioninit - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.CheckoutAgg.Entities.Checkout", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CheckoutEndDate") - .HasColumnType("datetime2"); - - b.Property("CheckoutStartDate") - .HasColumnType("datetime2"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("DeductionFromSalary") - .HasColumnType("float"); - - b.Property("FullName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("MandatoryHours") - .HasColumnType("int"); - - b.Property("Month") - .HasColumnType("int"); - - b.Property("MonthlySalaryDefined") - .HasColumnType("float"); - - b.Property("MonthlySalaryPay") - .HasColumnType("float"); - - b.Property("RemainingHours") - .HasColumnType("int"); - - b.Property("TotalDaysWorked") - .HasColumnType("int"); - - b.Property("TotalHoursWorked") - .HasColumnType("int"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Checkouts", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.CustomerAgg.Customer", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.ToTable("Customers", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.FileManagementAgg.Entities.UploadedFile", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("DeletedByUserId") - .HasColumnType("bigint"); - - b.Property("DeletedDate") - .HasColumnType("datetime2"); - - b.Property("DurationSeconds") - .HasColumnType("int"); - - b.Property("FileExtension") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("FileSizeBytes") - .HasColumnType("bigint"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("ImageHeight") - .HasColumnType("int"); - - b.Property("ImageWidth") - .HasColumnType("int"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("IsVirusScanPassed") - .HasColumnType("bit"); - - b.Property("MimeType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("OriginalFileName") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("ReferenceEntityId") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("ReferenceEntityType") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("StoragePath") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("StorageProvider") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("StorageUrl") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("ThumbnailUrl") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("UniqueFileName") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("UploadDate") - .HasColumnType("datetime2"); - - b.Property("UploadedByUserId") - .HasColumnType("bigint"); - - b.Property("VirusScanDate") - .HasColumnType("datetime2"); - - b.Property("VirusScanResult") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.HasKey("Id"); - - b.HasIndex("Category"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("Status"); - - b.HasIndex("UniqueFileName") - .IsUnique(); - - b.HasIndex("UploadedByUserId"); - - b.HasIndex("ReferenceEntityType", "ReferenceEntityId"); - - b.ToTable("UploadedFiles", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("InitialDescription") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("OriginalAssignedUserId") - .HasColumnType("bigint"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("TaskId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TaskId"); - - b.ToTable("BugSections", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("PhaseId") - .HasColumnType("uniqueidentifier"); - - b.Property("SkillId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("PhaseId"); - - b.HasIndex("SkillId"); - - b.ToTable("PhaseSections"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("EndDate") - .HasColumnType("datetime2"); - - b.Property("HasAssignmentOverride") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("PlannedEndDate") - .HasColumnType("datetime2"); - - b.Property("PlannedStartDate") - .HasColumnType("datetime2"); - - b.Property("StartDate") - .HasColumnType("datetime2"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("DeployStatus") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("EndDate") - .HasColumnType("datetime2"); - - b.Property("HasAssignmentOverride") - .HasColumnType("bit"); - - b.Property("IsArchived") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("OrderIndex") - .HasColumnType("int"); - - b.Property("ProjectId") - .HasColumnType("uniqueidentifier"); - - b.Property("StartDate") - .HasColumnType("datetime2"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ProjectId"); - - b.ToTable("ProjectPhases", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectSection", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("ProjectId") - .HasColumnType("uniqueidentifier"); - - b.Property("SkillId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ProjectId"); - - b.HasIndex("SkillId"); - - b.ToTable("ProjectSections"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AllocatedTime") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("DueDate") - .HasColumnType("datetime2"); - - b.Property("EndDate") - .HasColumnType("datetime2"); - - b.Property("HasAssignmentOverride") - .HasColumnType("bit"); - - b.Property("HasTimeOverride") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("OrderIndex") - .HasColumnType("int"); - - b.Property("PhaseId") - .HasColumnType("uniqueidentifier"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("StartDate") - .HasColumnType("datetime2"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("PhaseId"); - - b.ToTable("ProjectTasks", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("CurrentAssignedUserId") - .HasColumnType("bigint"); - - b.Property("InitialDescription") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("InitialEstimatedHours") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("OriginalAssignedUserId") - .HasColumnType("bigint"); - - b.Property("SkillId") - .HasColumnType("uniqueidentifier"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("TaskId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("SkillId"); - - b.HasIndex("TaskId"); - - b.ToTable("TaskSections", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionActivity", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("EndDate") - .HasColumnType("datetime2"); - - b.Property("EndNotes") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("SectionId") - .HasColumnType("uniqueidentifier"); - - b.Property("StartDate") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("SectionId"); - - b.ToTable("TaskSectionActivities", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionAdditionalTime", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AddedAt") - .HasColumnType("datetime2"); - - b.Property("AddedByUserId") - .HasColumnType("bigint"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("Hours") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Reason") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("TaskSectionId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TaskSectionId"); - - b.ToTable("TaskSectionAdditionalTimes", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.RoleAgg.Entities.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("GozareshgirRoleId") - .HasColumnType("bigint"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.ToTable("PmRoles", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.SalaryPaymentSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("EndSettingDate") - .HasColumnType("datetime2"); - - b.Property("HolidayWorking") - .HasColumnType("bit"); - - b.Property("MonthlySalary") - .HasColumnType("float"); - - b.Property("StartSettingDate") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.ToTable("SalaryPaymentSetting", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.ToTable("Skills", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("DeletedDate") - .HasColumnType("datetime2"); - - b.Property("EditedDate") - .HasColumnType("datetime2"); - - b.Property("FileId") - .HasColumnType("uniqueidentifier"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("IsEdited") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("IsPinned") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("MessageType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("PinnedByUserId") - .HasColumnType("bigint"); - - b.Property("PinnedDate") - .HasColumnType("datetime2"); - - b.Property("ReplyToMessageId") - .HasColumnType("uniqueidentifier"); - - b.Property("SenderUserId") - .HasColumnType("bigint"); - - b.Property("TaskId") - .HasColumnType("uniqueidentifier"); - - b.Property("TextContent") - .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDate"); - - b.HasIndex("FileId"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ReplyToMessageId"); - - b.HasIndex("SenderUserId"); - - b.HasIndex("TaskId"); - - b.HasIndex("TaskId", "IsPinned"); - - b.ToTable("TaskChatMessages", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AccountId") - .HasColumnType("bigint"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("Email") - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("FullName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("Mobile") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); - - b.Property("Password") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("ProfilePhotoPath") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("VerifyCode") - .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); - - b.HasKey("Id"); - - b.ToTable("Users", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.UserRefreshToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("ExpiresAt") - .HasColumnType("datetime2"); - - b.Property("IpAddress") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("RevokedAt") - .HasColumnType("datetime2"); - - b.Property("Token") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("UserAgent") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ExpiresAt"); - - b.HasIndex("Token") - .IsUnique(); - - b.HasIndex("UserId"); - - b.ToTable("UserRefreshTokens", (string)null); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "ProjectTask") - .WithMany("BugSectionList") - .HasForeignKey("TaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.OwnsMany("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugDocument", "BugDocuments", b1 => - { - b1.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b1.Property("BugSectionId") - .HasColumnType("uniqueidentifier"); - - b1.Property("FileId") - .HasColumnType("uniqueidentifier"); - - b1.HasKey("Id"); - - b1.HasIndex("BugSectionId"); - - b1.ToTable("BugDocuments", (string)null); - - b1.WithOwner("BugSection") - .HasForeignKey("BugSectionId"); - - b1.Navigation("BugSection"); - }); - - b.Navigation("BugDocuments"); - - b.Navigation("ProjectTask"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase") - .WithMany("PhaseSections") - .HasForeignKey("PhaseId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") - .WithMany() - .HasForeignKey("SkillId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Phase"); - - b.Navigation("Skill"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", "Project") - .WithMany("Phases") - .HasForeignKey("ProjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Project"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectSection", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", "Project") - .WithMany("ProjectSections") - .HasForeignKey("ProjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") - .WithMany() - .HasForeignKey("SkillId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Project"); - - b.Navigation("Skill"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase") - .WithMany("Tasks") - .HasForeignKey("PhaseId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Phase"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", b => - { - b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") - .WithMany("Sections") - .HasForeignKey("SkillId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "Task") - .WithMany("Sections") - .HasForeignKey("TaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Skill"); - - b.Navigation("Task"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionActivity", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", "Section") - .WithMany("Activities") - .HasForeignKey("SectionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Section"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionAdditionalTime", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", null) - .WithMany("AdditionalTimes") - .HasForeignKey("TaskSectionId"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.RoleAgg.Entities.Role", b => - { - b.OwnsMany("GozareshgirProgramManager.Domain.PermissionAgg.Entities.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("PmRolePermissions", (string)null); - - b1.WithOwner("Role") - .HasForeignKey("RoleId"); - - b1.Navigation("Role"); - }); - - b.Navigation("Permissions"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.SalaryPaymentSetting", b => - { - b.OwnsMany("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.WorkingHours", "WorkingHoursList", b1 => - { - b1.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); - - b1.Property("EndShiftOne") - .HasColumnType("time(0)"); - - b1.Property("EndShiftTwo") - .HasColumnType("time(0)"); - - b1.Property("HasRestTime") - .HasColumnType("bit"); - - b1.Property("HasShiftOne") - .HasColumnType("bit"); - - b1.Property("HasShiftTow") - .HasColumnType("bit"); - - b1.Property("IsActiveDay") - .HasColumnType("bit"); - - b1.Property("PersianDayOfWeek") - .HasColumnType("int"); - - b1.Property("RestTime") - .HasColumnType("time(0)"); - - b1.Property("SalaryPaymentSettingId") - .HasColumnType("bigint"); - - b1.Property("ShiftDurationInMinutes") - .HasColumnType("int"); - - b1.Property("StartShiftOne") - .HasColumnType("time(0)"); - - b1.Property("StartShiftTwo") - .HasColumnType("time(0)"); - - b1.HasKey("Id"); - - b1.HasIndex("SalaryPaymentSettingId"); - - b1.ToTable("WorkingHours", (string)null); - - b1.WithOwner("SalaryPaymentSetting") - .HasForeignKey("SalaryPaymentSettingId"); - - b1.Navigation("SalaryPaymentSetting"); - }); - - b.Navigation("WorkingHoursList"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", b => - { - b.HasOne("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", "ReplyToMessage") - .WithMany() - .HasForeignKey("ReplyToMessageId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("ReplyToMessage"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => - { - b.OwnsMany("GozareshgirProgramManager.Domain.RoleUserAgg.RoleUser", "RoleUser", b1 => - { - b1.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); - - b1.Property("RoleId") - .HasColumnType("bigint"); - - b1.Property("UserId") - .HasColumnType("bigint"); - - b1.HasKey("Id"); - - b1.HasIndex("UserId"); - - b1.ToTable("RoleUsers", (string)null); - - b1.WithOwner("User") - .HasForeignKey("UserId"); - - b1.Navigation("User"); - }); - - b.Navigation("RoleUser"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.UserRefreshToken", b => - { - b.HasOne("GozareshgirProgramManager.Domain.UserAgg.Entities.User", "User") - .WithMany("RefreshTokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", b => - { - b.Navigation("Phases"); - - b.Navigation("ProjectSections"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", b => - { - b.Navigation("PhaseSections"); - - b.Navigation("Tasks"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => - { - b.Navigation("BugSectionList"); - - b.Navigation("Sections"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", b => - { - b.Navigation("Activities"); - - b.Navigation("AdditionalTimes"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", b => - { - b.Navigation("Sections"); - }); - - modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => - { - b.Navigation("RefreshTokens"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.cs deleted file mode 100644 index e3bfc2c9..00000000 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127100843_BugSectioninit.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace GozareshgirProgramManager.Infrastructure.Migrations -{ - /// - public partial class BugSectioninit : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "BugSections", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TaskId = table.Column(type: "uniqueidentifier", nullable: false), - InitialDescription = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - OriginalAssignedUserId = table.Column(type: "bigint", nullable: false), - Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - CreationDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BugSections", x => x.Id); - table.ForeignKey( - name: "FK_BugSections_ProjectTasks_TaskId", - column: x => x.TaskId, - principalTable: "ProjectTasks", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "BugDocuments", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - FileId = table.Column(type: "uniqueidentifier", nullable: false), - BugSectionId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BugDocuments", x => x.Id); - table.ForeignKey( - name: "FK_BugDocuments_BugSections_BugSectionId", - column: x => x.BugSectionId, - principalTable: "BugSections", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_BugDocuments_BugSectionId", - table: "BugDocuments", - column: "BugSectionId"); - - migrationBuilder.CreateIndex( - name: "IX_BugSections_TaskId", - table: "BugSections", - column: "TaskId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "BugDocuments"); - - migrationBuilder.DropTable( - name: "BugSections"); - } - } -} diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs index f022a8af..20d42131 100644 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs @@ -227,41 +227,6 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.ToTable("UploadedFiles", (string)null); }); - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("InitialDescription") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("OriginalAssignedUserId") - .HasColumnType("bigint"); - - b.Property("Priority") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("TaskId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TaskId"); - - b.ToTable("BugSections", (string)null); - }); - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => { b.Property("Id") @@ -286,7 +251,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.HasIndex("SkillId"); - b.ToTable("PhaseSections"); + b.ToTable("PhaseSections", (string)null); }); modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", b => @@ -406,7 +371,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.HasIndex("SkillId"); - b.ToTable("ProjectSections"); + b.ToTable("ProjectSections", (string)null); }); modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => @@ -827,43 +792,6 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.ToTable("UserRefreshTokens", (string)null); }); - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => - { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "ProjectTask") - .WithMany("BugSectionList") - .HasForeignKey("TaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.OwnsMany("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugDocument", "BugDocuments", b1 => - { - b1.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b1.Property("BugSectionId") - .HasColumnType("uniqueidentifier"); - - b1.Property("FileId") - .HasColumnType("uniqueidentifier"); - - b1.HasKey("Id"); - - b1.HasIndex("BugSectionId"); - - b1.ToTable("BugDocuments", (string)null); - - b1.WithOwner("BugSection") - .HasForeignKey("BugSectionId"); - - b1.Navigation("BugSection"); - }); - - b.Navigation("BugDocuments"); - - b.Navigation("ProjectTask"); - }); - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => { b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase") @@ -1119,8 +1047,6 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => { - b.Navigation("BugSectionList"); - b.Navigation("Sections"); }); From 23d42bd8f52e239035f0876f075706a46e94de05 Mon Sep 17 00:00:00 2001 From: mahan Date: Tue, 27 Jan 2026 18:53:21 +0330 Subject: [PATCH 4/5] add initial migration for BugSection and BugDocuments tables --- ...0260127151807_Bug Section Init.Designer.cs | 1149 +++++++++++++++++ .../20260127151807_Bug Section Init.cs | 77 ++ .../Migrations/AppDbContextModelSnapshot.cs | 78 +- 3 files changed, 1302 insertions(+), 2 deletions(-) create mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.Designer.cs create mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.cs diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.Designer.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.Designer.cs new file mode 100644 index 00000000..d00dd655 --- /dev/null +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.Designer.cs @@ -0,0 +1,1149 @@ +// +using System; +using GozareshgirProgramManager.Infrastructure.Persistence.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace GozareshgirProgramManager.Infrastructure.Migrations +{ + [DbContext(typeof(ProgramManagerDbContext))] + [Migration("20260127151807_Bug Section Init")] + partial class BugSectionInit + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.CheckoutAgg.Entities.Checkout", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckoutEndDate") + .HasColumnType("datetime2"); + + b.Property("CheckoutStartDate") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeductionFromSalary") + .HasColumnType("float"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MandatoryHours") + .HasColumnType("int"); + + b.Property("Month") + .HasColumnType("int"); + + b.Property("MonthlySalaryDefined") + .HasColumnType("float"); + + b.Property("MonthlySalaryPay") + .HasColumnType("float"); + + b.Property("RemainingHours") + .HasColumnType("int"); + + b.Property("TotalDaysWorked") + .HasColumnType("int"); + + b.Property("TotalHoursWorked") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Checkouts", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.CustomerAgg.Customer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("Customers", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.FileManagementAgg.Entities.UploadedFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeletedByUserId") + .HasColumnType("bigint"); + + b.Property("DeletedDate") + .HasColumnType("datetime2"); + + b.Property("DurationSeconds") + .HasColumnType("int"); + + b.Property("FileExtension") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FileSizeBytes") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ImageHeight") + .HasColumnType("int"); + + b.Property("ImageWidth") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsVirusScanPassed") + .HasColumnType("bit"); + + b.Property("MimeType") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("OriginalFileName") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ReferenceEntityId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ReferenceEntityType") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("StoragePath") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StorageProvider") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("StorageUrl") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ThumbnailUrl") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UniqueFileName") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UploadDate") + .HasColumnType("datetime2"); + + b.Property("UploadedByUserId") + .HasColumnType("bigint"); + + b.Property("VirusScanDate") + .HasColumnType("datetime2"); + + b.Property("VirusScanResult") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("Category"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("Status"); + + b.HasIndex("UniqueFileName") + .IsUnique(); + + b.HasIndex("UploadedByUserId"); + + b.HasIndex("ReferenceEntityType", "ReferenceEntityId"); + + b.ToTable("UploadedFiles", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("InitialDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("OriginalAssignedUserId") + .HasColumnType("bigint"); + + b.Property("Priority") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TaskId"); + + b.ToTable("BugSections", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("SkillId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("PhaseId"); + + b.HasIndex("SkillId"); + + b.ToTable("PhaseSections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("HasAssignmentOverride") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("PlannedEndDate") + .HasColumnType("datetime2"); + + b.Property("PlannedStartDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Projects", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeployStatus") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("HasAssignmentOverride") + .HasColumnType("bit"); + + b.Property("IsArchived") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("OrderIndex") + .HasColumnType("int"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("ProjectPhases", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SkillId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.HasIndex("SkillId"); + + b.ToTable("ProjectSections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocatedTime") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("HasAssignmentOverride") + .HasColumnType("bit"); + + b.Property("HasTimeOverride") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("OrderIndex") + .HasColumnType("int"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("Priority") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("PhaseId"); + + b.ToTable("ProjectTasks", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CurrentAssignedUserId") + .HasColumnType("bigint"); + + b.Property("InitialDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("InitialEstimatedHours") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("OriginalAssignedUserId") + .HasColumnType("bigint"); + + b.Property("SkillId") + .HasColumnType("uniqueidentifier"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SkillId"); + + b.HasIndex("TaskId"); + + b.ToTable("TaskSections", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionActivity", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("EndNotes") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("Notes") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("SectionId"); + + b.ToTable("TaskSectionActivities", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionAdditionalTime", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AddedAt") + .HasColumnType("datetime2"); + + b.Property("AddedByUserId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Hours") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Reason") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("TaskSectionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TaskSectionId"); + + b.ToTable("TaskSectionAdditionalTimes", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.RoleAgg.Entities.Role", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("GozareshgirRoleId") + .HasColumnType("bigint"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("PmRoles", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.SalaryPaymentSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndSettingDate") + .HasColumnType("datetime2"); + + b.Property("HolidayWorking") + .HasColumnType("bit"); + + b.Property("MonthlySalary") + .HasColumnType("float"); + + b.Property("StartSettingDate") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("SalaryPaymentSetting", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("Skills", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeletedDate") + .HasColumnType("datetime2"); + + b.Property("EditedDate") + .HasColumnType("datetime2"); + + b.Property("FileId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsEdited") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsPinned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("MessageType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PinnedByUserId") + .HasColumnType("bigint"); + + b.Property("PinnedDate") + .HasColumnType("datetime2"); + + b.Property("ReplyToMessageId") + .HasColumnType("uniqueidentifier"); + + b.Property("SenderUserId") + .HasColumnType("bigint"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("TextContent") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.HasKey("Id"); + + b.HasIndex("CreationDate"); + + b.HasIndex("FileId"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ReplyToMessageId"); + + b.HasIndex("SenderUserId"); + + b.HasIndex("TaskId"); + + b.HasIndex("TaskId", "IsPinned"); + + b.ToTable("TaskChatMessages", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("Mobile") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ProfilePhotoPath") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("VerifyCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("Id"); + + b.ToTable("Users", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.UserRefreshToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("IpAddress") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RevokedAt") + .HasColumnType("datetime2"); + + b.Property("Token") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAt"); + + b.HasIndex("Token") + .IsUnique(); + + b.HasIndex("UserId"); + + b.ToTable("UserRefreshTokens", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "ProjectTask") + .WithMany("BugSectionList") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugDocument", "BugDocuments", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b1.Property("BugSectionId") + .HasColumnType("uniqueidentifier"); + + b1.Property("FileId") + .HasColumnType("uniqueidentifier"); + + b1.HasKey("Id"); + + b1.HasIndex("BugSectionId"); + + b1.ToTable("BugDocuments", (string)null); + + b1.WithOwner("BugSection") + .HasForeignKey("BugSectionId"); + + b1.Navigation("BugSection"); + }); + + b.Navigation("BugDocuments"); + + b.Navigation("ProjectTask"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase") + .WithMany("PhaseSections") + .HasForeignKey("PhaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") + .WithMany() + .HasForeignKey("SkillId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Phase"); + + b.Navigation("Skill"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", "Project") + .WithMany("Phases") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", "Project") + .WithMany("ProjectSections") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") + .WithMany() + .HasForeignKey("SkillId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Project"); + + b.Navigation("Skill"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase") + .WithMany("Tasks") + .HasForeignKey("PhaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Phase"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") + .WithMany("Sections") + .HasForeignKey("SkillId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "Task") + .WithMany("Sections") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Skill"); + + b.Navigation("Task"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionActivity", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", "Section") + .WithMany("Activities") + .HasForeignKey("SectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Section"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSectionAdditionalTime", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", null) + .WithMany("AdditionalTimes") + .HasForeignKey("TaskSectionId"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.RoleAgg.Entities.Role", b => + { + b.OwnsMany("GozareshgirProgramManager.Domain.PermissionAgg.Entities.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("PmRolePermissions", (string)null); + + b1.WithOwner("Role") + .HasForeignKey("RoleId"); + + b1.Navigation("Role"); + }); + + b.Navigation("Permissions"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.SalaryPaymentSetting", b => + { + b.OwnsMany("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.WorkingHours", "WorkingHoursList", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("EndShiftOne") + .HasColumnType("time(0)"); + + b1.Property("EndShiftTwo") + .HasColumnType("time(0)"); + + b1.Property("HasRestTime") + .HasColumnType("bit"); + + b1.Property("HasShiftOne") + .HasColumnType("bit"); + + b1.Property("HasShiftTow") + .HasColumnType("bit"); + + b1.Property("IsActiveDay") + .HasColumnType("bit"); + + b1.Property("PersianDayOfWeek") + .HasColumnType("int"); + + b1.Property("RestTime") + .HasColumnType("time(0)"); + + b1.Property("SalaryPaymentSettingId") + .HasColumnType("bigint"); + + b1.Property("ShiftDurationInMinutes") + .HasColumnType("int"); + + b1.Property("StartShiftOne") + .HasColumnType("time(0)"); + + b1.Property("StartShiftTwo") + .HasColumnType("time(0)"); + + b1.HasKey("Id"); + + b1.HasIndex("SalaryPaymentSettingId"); + + b1.ToTable("WorkingHours", (string)null); + + b1.WithOwner("SalaryPaymentSetting") + .HasForeignKey("SalaryPaymentSettingId"); + + b1.Navigation("SalaryPaymentSetting"); + }); + + b.Navigation("WorkingHoursList"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", b => + { + b.HasOne("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", "ReplyToMessage") + .WithMany() + .HasForeignKey("ReplyToMessageId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("ReplyToMessage"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => + { + b.OwnsMany("GozareshgirProgramManager.Domain.RoleUserAgg.RoleUser", "RoleUser", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("RoleId") + .HasColumnType("bigint"); + + b1.Property("UserId") + .HasColumnType("bigint"); + + b1.HasKey("Id"); + + b1.HasIndex("UserId"); + + b1.ToTable("RoleUsers", (string)null); + + b1.WithOwner("User") + .HasForeignKey("UserId"); + + b1.Navigation("User"); + }); + + b.Navigation("RoleUser"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.UserRefreshToken", b => + { + b.HasOne("GozareshgirProgramManager.Domain.UserAgg.Entities.User", "User") + .WithMany("RefreshTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project", b => + { + b.Navigation("Phases"); + + b.Navigation("ProjectSections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", b => + { + b.Navigation("PhaseSections"); + + b.Navigation("Tasks"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", b => + { + b.Navigation("BugSectionList"); + + b.Navigation("Sections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.TaskSection", b => + { + b.Navigation("Activities"); + + b.Navigation("AdditionalTimes"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", b => + { + b.Navigation("Sections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => + { + b.Navigation("RefreshTokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.cs new file mode 100644 index 00000000..e90e9580 --- /dev/null +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127151807_Bug Section Init.cs @@ -0,0 +1,77 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace GozareshgirProgramManager.Infrastructure.Migrations +{ + /// + public partial class BugSectionInit : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "BugSections", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TaskId = table.Column(type: "uniqueidentifier", nullable: false), + InitialDescription = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + OriginalAssignedUserId = table.Column(type: "bigint", nullable: false), + Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + CreationDate = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BugSections", x => x.Id); + table.ForeignKey( + name: "FK_BugSections_ProjectTasks_TaskId", + column: x => x.TaskId, + principalTable: "ProjectTasks", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "BugDocuments", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + FileId = table.Column(type: "uniqueidentifier", nullable: false), + BugSectionId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BugDocuments", x => x.Id); + table.ForeignKey( + name: "FK_BugDocuments_BugSections_BugSectionId", + column: x => x.BugSectionId, + principalTable: "BugSections", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_BugDocuments_BugSectionId", + table: "BugDocuments", + column: "BugSectionId"); + + migrationBuilder.CreateIndex( + name: "IX_BugSections_TaskId", + table: "BugSections", + column: "TaskId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "BugDocuments"); + + migrationBuilder.DropTable( + name: "BugSections"); + } + } +} diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs index 95e939be..eb2272bd 100644 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs @@ -227,6 +227,41 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.ToTable("UploadedFiles", (string)null); }); + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("InitialDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("OriginalAssignedUserId") + .HasColumnType("bigint"); + + b.Property("Priority") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TaskId"); + + b.ToTable("BugSections", (string)null); + }); + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => { b.Property("Id") @@ -251,7 +286,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.HasIndex("SkillId"); - b.ToTable("PhaseSections", (string)null); + b.ToTable("PhaseSections"); }); modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", b => @@ -371,7 +406,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.HasIndex("SkillId"); - b.ToTable("ProjectSections", (string)null); + b.ToTable("ProjectSections"); }); modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", b => @@ -867,6 +902,43 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.ToTable("UserRefreshTokens", (string)null); }); + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "ProjectTask") + .WithMany("BugSectionList") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugDocument", "BugDocuments", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b1.Property("BugSectionId") + .HasColumnType("uniqueidentifier"); + + b1.Property("FileId") + .HasColumnType("uniqueidentifier"); + + b1.HasKey("Id"); + + b1.HasIndex("BugSectionId"); + + b1.ToTable("BugDocuments", (string)null); + + b1.WithOwner("BugSection") + .HasForeignKey("BugSectionId"); + + b1.Navigation("BugSection"); + }); + + b.Navigation("BugDocuments"); + + b.Navigation("ProjectTask"); + }); + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => { b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase") @@ -1170,6 +1242,8 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", b => { + b.Navigation("BugSectionList"); + b.Navigation("Sections"); }); From 2f45d519b98ec302b8d592095baa508db531881b Mon Sep 17 00:00:00 2001 From: gozareshgir Date: Wed, 28 Jan 2026 12:34:23 +0330 Subject: [PATCH 5/5] SnapShot Fixed - bugSectionWorkflow Completed --- .../WorkflowList/WorkflowCountQuery.cs | 9 +- .../20260127162406_test.Designer.cs | 1272 +++++++++++++++++ .../Migrations/20260127162406_test.cs | 24 + ...> ProgramManagerDbContextModelSnapshot.cs} | 10 +- 4 files changed, 1307 insertions(+), 8 deletions(-) create mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.Designer.cs create mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.cs rename ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/{AppDbContextModelSnapshot.cs => ProgramManagerDbContextModelSnapshot.cs} (99%) diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowCountQuery.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowCountQuery.cs index 0de756bd..e59d64b6 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowCountQuery.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Workflows/Queries/WorkflowList/WorkflowCountQuery.cs @@ -4,7 +4,7 @@ using GozareshgirProgramManager.Application.Modules.Workflows.Queries.WorkflowLi namespace GozareshgirProgramManager.Application.Modules.Workflows.Queries.WorkflowList; -public record WorkflowCountResponse(int Total, int Rejected, int NotAssigned, int PendingForApproval); +public record WorkflowCountResponse(int Total, int Rejected, int NotAssigned, int PendingForApproval,int BugSection); public record WorkflowCountQuery() : IBaseQuery; @@ -28,6 +28,7 @@ public class WorkflowCountQueryHandler : IBaseQueryHandler.Success(response); } } diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.Designer.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.Designer.cs new file mode 100644 index 00000000..852616e3 --- /dev/null +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.Designer.cs @@ -0,0 +1,1272 @@ +// +using System; +using GozareshgirProgramManager.Infrastructure.Persistence.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace GozareshgirProgramManager.Infrastructure.Migrations +{ + [DbContext(typeof(ProgramManagerDbContext))] + [Migration("20260127162406_test")] + partial class test + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.CheckoutAgg.Entities.Checkout", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckoutEndDate") + .HasColumnType("datetime2"); + + b.Property("CheckoutStartDate") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeductionFromSalary") + .HasColumnType("float"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MandatoryHours") + .HasColumnType("int"); + + b.Property("Month") + .HasColumnType("int"); + + b.Property("MonthlySalaryDefined") + .HasColumnType("float"); + + b.Property("MonthlySalaryPay") + .HasColumnType("float"); + + b.Property("RemainingHours") + .HasColumnType("int"); + + b.Property("TotalDaysWorked") + .HasColumnType("int"); + + b.Property("TotalHoursWorked") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Checkouts", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.CustomerAgg.Customer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("Customers", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.FileManagementAgg.Entities.UploadedFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeletedByUserId") + .HasColumnType("bigint"); + + b.Property("DeletedDate") + .HasColumnType("datetime2"); + + b.Property("DurationSeconds") + .HasColumnType("int"); + + b.Property("FileExtension") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FileSizeBytes") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ImageHeight") + .HasColumnType("int"); + + b.Property("ImageWidth") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsVirusScanPassed") + .HasColumnType("bit"); + + b.Property("MimeType") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("OriginalFileName") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ReferenceEntityId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ReferenceEntityType") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("StoragePath") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StorageProvider") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("StorageUrl") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ThumbnailUrl") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UniqueFileName") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UploadDate") + .HasColumnType("datetime2"); + + b.Property("UploadedByUserId") + .HasColumnType("bigint"); + + b.Property("VirusScanDate") + .HasColumnType("datetime2"); + + b.Property("VirusScanResult") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("Category"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("Status"); + + b.HasIndex("UniqueFileName") + .IsUnique(); + + b.HasIndex("UploadedByUserId"); + + b.HasIndex("ReferenceEntityType", "ReferenceEntityId"); + + b.ToTable("UploadedFiles", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("InitialDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("OriginalAssignedUserId") + .HasColumnType("bigint"); + + b.Property("Priority") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TaskId"); + + b.ToTable("BugSections", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.PhaseSection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("SkillId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("PhaseId"); + + b.HasIndex("SkillId"); + + b.ToTable("PhaseSections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeployStatus") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("HasAssignmentOverride") + .HasColumnType("bit"); + + b.Property("IsArchived") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("OrderIndex") + .HasColumnType("int"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("ProjectPhases", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project.Project", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("HasAssignmentOverride") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("PlannedEndDate") + .HasColumnType("datetime2"); + + b.Property("PlannedStartDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Projects", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project.ProjectSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ProjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SkillId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.HasIndex("SkillId"); + + b.ToTable("ProjectSections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocatedTime") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("HasAssignmentOverride") + .HasColumnType("bit"); + + b.Property("HasTimeOverride") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("OrderIndex") + .HasColumnType("int"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("Priority") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("PhaseId"); + + b.ToTable("ProjectTasks", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CurrentAssignedUserId") + .HasColumnType("bigint"); + + b.Property("InitialDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("InitialEstimatedHours") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("OriginalAssignedUserId") + .HasColumnType("bigint"); + + b.Property("SkillId") + .HasColumnType("uniqueidentifier"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SkillId"); + + b.HasIndex("TaskId"); + + b.ToTable("TaskSections", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionActivity", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("EndNotes") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("Notes") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("SectionId"); + + b.ToTable("TaskSectionActivities", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionAdditionalTime", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AddedAt") + .HasColumnType("datetime2"); + + b.Property("AddedByUserId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Hours") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Reason") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("TaskSectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("TaskSectionId"); + + b.ToTable("TaskSectionAdditionalTimes", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionRevision", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedByUserId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Message") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskSectionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("TaskSectionRevisions"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionTimeRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RequestType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RequestedTime") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("TaskSectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("TaskSectionId"); + + b.ToTable("TaskSectionTimeRequests"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.RoleAgg.Entities.Role", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("GozareshgirRoleId") + .HasColumnType("bigint"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("PmRoles", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.SalaryPaymentSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("EndSettingDate") + .HasColumnType("datetime2"); + + b.Property("HolidayWorking") + .HasColumnType("bit"); + + b.Property("MonthlySalary") + .HasColumnType("float"); + + b.Property("StartSettingDate") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("SalaryPaymentSetting", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("Skills", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("DeletedDate") + .HasColumnType("datetime2"); + + b.Property("EditedDate") + .HasColumnType("datetime2"); + + b.Property("FileId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsEdited") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsPinned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("MessageType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PinnedByUserId") + .HasColumnType("bigint"); + + b.Property("PinnedDate") + .HasColumnType("datetime2"); + + b.Property("ReplyToMessageId") + .HasColumnType("uniqueidentifier"); + + b.Property("SenderUserId") + .HasColumnType("bigint"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("TextContent") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.HasKey("Id"); + + b.HasIndex("CreationDate"); + + b.HasIndex("FileId"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ReplyToMessageId"); + + b.HasIndex("SenderUserId"); + + b.HasIndex("TaskId"); + + b.HasIndex("TaskId", "IsPinned"); + + b.ToTable("TaskChatMessages", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("bigint"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("Mobile") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ProfilePhotoPath") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("VerifyCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("Id"); + + b.ToTable("Users", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.UserRefreshToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("IpAddress") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RevokedAt") + .HasColumnType("datetime2"); + + b.Property("Token") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAt"); + + b.HasIndex("Token") + .IsUnique(); + + b.HasIndex("UserId"); + + b.ToTable("UserRefreshTokens", (string)null); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", "ProjectTask") + .WithMany("BugSectionList") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugDocument", "BugDocuments", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b1.Property("BugSectionId") + .HasColumnType("uniqueidentifier"); + + b1.Property("FileId") + .HasColumnType("uniqueidentifier"); + + b1.HasKey("Id"); + + b1.HasIndex("BugSectionId"); + + b1.ToTable("BugDocuments", (string)null); + + b1.WithOwner("BugSection") + .HasForeignKey("BugSectionId"); + + b1.Navigation("BugSection"); + }); + + b.Navigation("BugDocuments"); + + b.Navigation("ProjectTask"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.PhaseSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", "Phase") + .WithMany("PhaseSections") + .HasForeignKey("PhaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") + .WithMany() + .HasForeignKey("SkillId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Phase"); + + b.Navigation("Skill"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project.Project", "Project") + .WithMany("Phases") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Project"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project.ProjectSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project.Project", "Project") + .WithMany("ProjectSections") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") + .WithMany() + .HasForeignKey("SkillId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Project"); + + b.Navigation("Skill"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", "Phase") + .WithMany("Tasks") + .HasForeignKey("PhaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Phase"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSection", b => + { + b.HasOne("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", "Skill") + .WithMany("Sections") + .HasForeignKey("SkillId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", "Task") + .WithMany("Sections") + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Skill"); + + b.Navigation("Task"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionActivity", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSection", "Section") + .WithMany("Activities") + .HasForeignKey("SectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Section"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionAdditionalTime", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSection", null) + .WithMany("AdditionalTimes") + .HasForeignKey("TaskSectionId"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionRevision", b => + { + b.OwnsMany("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskRevisionFile", "Files", b1 => + { + b1.Property("Id") + .HasColumnType("uniqueidentifier"); + + b1.Property("CreationDate") + .HasColumnType("datetime2"); + + b1.Property("FileId") + .HasColumnType("uniqueidentifier"); + + b1.Property("TaskSectionRevisionId") + .HasColumnType("uniqueidentifier"); + + b1.HasKey("Id"); + + b1.HasIndex("FileId"); + + b1.HasIndex("TaskSectionRevisionId"); + + b1.ToTable("TaskRevisionFile"); + + b1.HasOne("GozareshgirProgramManager.Domain.FileManagementAgg.Entities.UploadedFile", null) + .WithMany() + .HasForeignKey("FileId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b1.WithOwner() + .HasForeignKey("TaskSectionRevisionId"); + }); + + b.Navigation("Files"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSectionTimeRequest", b => + { + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSection", "TaskSection") + .WithMany() + .HasForeignKey("TaskSectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TaskSection"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.RoleAgg.Entities.Role", b => + { + b.OwnsMany("GozareshgirProgramManager.Domain.PermissionAgg.Entities.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("PmRolePermissions", (string)null); + + b1.WithOwner("Role") + .HasForeignKey("RoleId"); + + b1.Navigation("Role"); + }); + + b.Navigation("Permissions"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.SalaryPaymentSetting", b => + { + b.OwnsMany("GozareshgirProgramManager.Domain.SalaryPaymentSettingAgg.Entities.WorkingHours", "WorkingHoursList", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("EndShiftOne") + .HasColumnType("time(0)"); + + b1.Property("EndShiftTwo") + .HasColumnType("time(0)"); + + b1.Property("HasRestTime") + .HasColumnType("bit"); + + b1.Property("HasShiftOne") + .HasColumnType("bit"); + + b1.Property("HasShiftTow") + .HasColumnType("bit"); + + b1.Property("IsActiveDay") + .HasColumnType("bit"); + + b1.Property("PersianDayOfWeek") + .HasColumnType("int"); + + b1.Property("RestTime") + .HasColumnType("time(0)"); + + b1.Property("SalaryPaymentSettingId") + .HasColumnType("bigint"); + + b1.Property("ShiftDurationInMinutes") + .HasColumnType("int"); + + b1.Property("StartShiftOne") + .HasColumnType("time(0)"); + + b1.Property("StartShiftTwo") + .HasColumnType("time(0)"); + + b1.HasKey("Id"); + + b1.HasIndex("SalaryPaymentSettingId"); + + b1.ToTable("WorkingHours", (string)null); + + b1.WithOwner("SalaryPaymentSetting") + .HasForeignKey("SalaryPaymentSettingId"); + + b1.Navigation("SalaryPaymentSetting"); + }); + + b.Navigation("WorkingHoursList"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", b => + { + b.HasOne("GozareshgirProgramManager.Domain.TaskChatAgg.Entities.TaskChatMessage", "ReplyToMessage") + .WithMany() + .HasForeignKey("ReplyToMessageId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("ReplyToMessage"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => + { + b.OwnsMany("GozareshgirProgramManager.Domain.RoleUserAgg.RoleUser", "RoleUser", b1 => + { + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property("Id")); + + b1.Property("RoleId") + .HasColumnType("bigint"); + + b1.Property("UserId") + .HasColumnType("bigint"); + + b1.HasKey("Id"); + + b1.HasIndex("UserId"); + + b1.ToTable("RoleUsers", (string)null); + + b1.WithOwner("User") + .HasForeignKey("UserId"); + + b1.Navigation("User"); + }); + + b.Navigation("RoleUser"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.UserRefreshToken", b => + { + b.HasOne("GozareshgirProgramManager.Domain.UserAgg.Entities.User", "User") + .WithMany("RefreshTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", b => + { + b.Navigation("PhaseSections"); + + b.Navigation("Tasks"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Project.Project", b => + { + b.Navigation("Phases"); + + b.Navigation("ProjectSections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", b => + { + b.Navigation("BugSectionList"); + + b.Navigation("Sections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection.TaskSection", b => + { + b.Navigation("Activities"); + + b.Navigation("AdditionalTimes"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.SkillAgg.Entities.Skill", b => + { + b.Navigation("Sections"); + }); + + modelBuilder.Entity("GozareshgirProgramManager.Domain.UserAgg.Entities.User", b => + { + b.Navigation("RefreshTokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.cs new file mode 100644 index 00000000..7e9b2ba1 --- /dev/null +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/20260127162406_test.cs @@ -0,0 +1,24 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace GozareshgirProgramManager.Infrastructure.Migrations +{ + /// + public partial class test : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/ProgramManagerDbContextModelSnapshot.cs similarity index 99% rename from ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs rename to ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/ProgramManagerDbContextModelSnapshot.cs index eb2272bd..a942eb3a 100644 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/AppDbContextModelSnapshot.cs +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Migrations/ProgramManagerDbContextModelSnapshot.cs @@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace GozareshgirProgramManager.Infrastructure.Migrations { [DbContext(typeof(ProgramManagerDbContext))] - partial class AppDbContextModelSnapshot : ModelSnapshot + partial class ProgramManagerDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { @@ -262,7 +262,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.ToTable("BugSections", (string)null); }); - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.PhaseSection", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -904,7 +904,7 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.BugSection", b => { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectTask", "ProjectTask") + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.ProjectTask", "ProjectTask") .WithMany("BugSectionList") .HasForeignKey("TaskId") .OnDelete(DeleteBehavior.Cascade) @@ -939,9 +939,9 @@ namespace GozareshgirProgramManager.Infrastructure.Migrations b.Navigation("ProjectTask"); }); - modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.PhaseSection", b => + modelBuilder.Entity("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.PhaseSection", b => { - b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.ProjectPhase", "Phase") + b.HasOne("GozareshgirProgramManager.Domain.ProjectAgg.Entities.Phase.ProjectPhase", "Phase") .WithMany("PhaseSections") .HasForeignKey("PhaseId") .OnDelete(DeleteBehavior.Cascade)