Files
Backend-Api/CompanyManagment.EFCore/Mapping/InsuranceListMapping.cs
2024-07-05 21:36:15 +03:30

17 lines
528 B
C#

using Company.Domain.InsuranceListAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping;
public class InsuranceListMapping : IEntityTypeConfiguration<InsuranceList>
{
public void Configure(EntityTypeBuilder<InsuranceList> builder)
{
builder.ToTable("InsuranceLists");
builder.HasKey(x => x.id);
builder.Property(x => x.Year).HasMaxLength(4);
builder.Property(x => x.Month).HasMaxLength(2);
}
}