add time section time request mapping

This commit is contained in:
2026-01-21 19:17:52 +03:30
parent a7c97b22b4
commit 36ccd96352
2 changed files with 56 additions and 0 deletions

View File

@@ -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<TaskSectionRevision>
{
public void Configure(EntityTypeBuilder<TaskSectionRevision> builder)
{
builder.HasKey(x => x.Id);
builder.Property(x => x.Id)
.ValueGeneratedNever();
builder.Property(x => x.Status).HasConversion<string>();
builder.Property(x => x.Message).HasMaxLength(500);
builder.OwnsMany(x=>x.Files, file =>
{
})
}
}

View File

@@ -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<TaskSectionTimeRequest>
{
public void Configure(EntityTypeBuilder<TaskSectionTimeRequest> builder)
{
builder.HasKey(x => x.Id);
builder.Property(x => x.Id)
.ValueGeneratedNever();
builder.Property(x => x.RequestStatus).
HasConversion<string>().HasMaxLength(50);
builder.Property(x=>x.RequestType).
HasConversion<string>().HasMaxLength(50);
builder.Property(x => x.RequestedTime)
.HasTimeSpanConversion();
builder.Property(x => x.TaskSection)
.HasConversion<string>()
.HasMaxLength(50);
}
}