From a3fd3e6920db1e9a715894f0818da32bdb95bbd6 Mon Sep 17 00:00:00 2001 From: mahan Date: Thu, 22 Jan 2026 10:17:04 +0330 Subject: [PATCH] add mapping --- .../Persistence/Context/ProgramManagerDbContext.cs | 6 ++++++ ...meRequestMapping.cs => TaskSectionTimeRequestMapping.cs} | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) rename ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/{TimeSectionTimeRequestMapping.cs => TaskSectionTimeRequestMapping.cs} (84%) diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Context/ProgramManagerDbContext.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Context/ProgramManagerDbContext.cs index d2cce1ae..48e91fae 100644 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Context/ProgramManagerDbContext.cs +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Context/ProgramManagerDbContext.cs @@ -53,6 +53,12 @@ public class ProgramManagerDbContext : DbContext, IProgramManagerDbContext // Task Chat public DbSet TaskChatMessages { get; set; } = null!; + //Task Section Time Request + public DbSet TaskSectionTimeRequests { get; set; } + + // Task Section Revision + public DbSet TaskSectionRevisions { get; set; } + protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.ApplyConfigurationsFromAssembly(typeof(ProgramManagerDbContext).Assembly); diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TimeSectionTimeRequestMapping.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TaskSectionTimeRequestMapping.cs similarity index 84% rename from ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TimeSectionTimeRequestMapping.cs rename to ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TaskSectionTimeRequestMapping.cs index a06a6355..79f292c2 100644 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TimeSectionTimeRequestMapping.cs +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TaskSectionTimeRequestMapping.cs @@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace GozareshgirProgramManager.Infrastructure.Persistence.Mappings; -public class TimeSectionTimeRequestMapping:IEntityTypeConfiguration +public class TaskSectionTimeRequestMapping:IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { @@ -27,5 +27,8 @@ public class TimeSectionTimeRequestMapping:IEntityTypeConfiguration() .HasMaxLength(50); + builder.HasOne(x=>x.TaskSection) + .WithMany().HasForeignKey(x=>x.TaskSectionId); + } } \ No newline at end of file