add time section time request mapping
This commit is contained in:
@@ -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 =>
|
||||
{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user