Files
Backend-Api/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Persistence/Mappings/AdditionalTimeMapping.cs

24 lines
848 B
C#

using GozareshgirProgramManager.Domain.ProjectAgg.Entities;
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 AdditionalTimeMapping:IEntityTypeConfiguration<TaskSectionAdditionalTime>
{
public void Configure(EntityTypeBuilder<TaskSectionAdditionalTime> builder)
{
builder.ToTable("AdditionalTimes");
builder.HasKey(ts => ts.Id);
builder.Property(ts => ts.Id)
.ValueGeneratedNever();
builder.Property(x => x.Reason).HasMaxLength(1000);
builder.Property(x => x.Hours).HasTimeSpanConversion();
}
}