Files
Backend-Api/AccountMangement.Infrastructure.EFCore/Mappings/TaskSubjectMapping.cs
2024-07-05 21:36:15 +03:30

17 lines
547 B
C#

using AccountManagement.Domain.AccountAgg;
using AccountManagement.Domain.TaskSubjectAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace AccountMangement.Infrastructure.EFCore.Mappings;
public class TaskSubjectMapping : IEntityTypeConfiguration<TaskSubject>
{
public void Configure(EntityTypeBuilder<TaskSubject> builder)
{
builder.ToTable("TaskSubjects");
builder.HasKey(x=>x.id);
builder.Property(x => x.Subject).HasMaxLength(100).IsRequired();
}
}