From 36ccd9635244275a771539d67a313205d338ca4a Mon Sep 17 00:00:00 2001 From: mahan Date: Wed, 21 Jan 2026 19:17:52 +0330 Subject: [PATCH] add time section time request mapping --- .../Mappings/TaskSectionRevisionMapping.cs | 25 +++++++++++++++ .../Mappings/TimeSectionTimeRequestMapping.cs | 31 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TaskSectionRevisionMapping.cs create mode 100644 ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TimeSectionTimeRequestMapping.cs diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TaskSectionRevisionMapping.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TaskSectionRevisionMapping.cs new file mode 100644 index 00000000..a763ddd8 --- /dev/null +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TaskSectionRevisionMapping.cs @@ -0,0 +1,25 @@ +using GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace GozareshgirProgramManager.Infrastructure.Persistence.Mappings; + +public class TaskSectionRevisionMapping:IEntityTypeConfiguration +{ + public void Configure(EntityTypeBuilder builder) + { + builder.HasKey(x => x.Id); + + builder.Property(x => x.Id) + .ValueGeneratedNever(); + + builder.Property(x => x.Status).HasConversion(); + + builder.Property(x => x.Message).HasMaxLength(500); + + builder.OwnsMany(x=>x.Files, file => + { + + }) + } +} \ No newline at end of file diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TimeSectionTimeRequestMapping.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TimeSectionTimeRequestMapping.cs new file mode 100644 index 00000000..a06a6355 --- /dev/null +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/TimeSectionTimeRequestMapping.cs @@ -0,0 +1,31 @@ +using GozareshgirProgramManager.Domain.ProjectAgg.Entities.Task.TaskSection; +using GozareshgirProgramManager.Infrastructure.Persistence._Common; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace GozareshgirProgramManager.Infrastructure.Persistence.Mappings; + +public class TimeSectionTimeRequestMapping:IEntityTypeConfiguration +{ + public void Configure(EntityTypeBuilder builder) + { + builder.HasKey(x => x.Id); + + builder.Property(x => x.Id) + .ValueGeneratedNever(); + + builder.Property(x => x.RequestStatus). + HasConversion().HasMaxLength(50); + + builder.Property(x=>x.RequestType). + HasConversion().HasMaxLength(50); + + builder.Property(x => x.RequestedTime) + .HasTimeSpanConversion(); + + builder.Property(x => x.TaskSection) + .HasConversion() + .HasMaxLength(50); + + } +} \ No newline at end of file