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

23 lines
953 B
C#

using Company.Domain.InsuranceEmployeeInfoAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping;
public class InsuranceEmployeeInfoMapping : IEntityTypeConfiguration<InsuranceEmployeeInfo>
{
public void Configure(EntityTypeBuilder<InsuranceEmployeeInfo> builder)
{
builder.ToTable("InsuranceEmployeeInformation");
builder.HasKey(x => x.id);
builder.Property(x => x.FName).HasMaxLength(100);
builder.Property(x => x.LName).HasMaxLength(100);
builder.Property(x => x.Gender).HasMaxLength(5);
builder.Property(x => x.NationalCode).HasMaxLength(10);
builder.Property(x => x.IdNumber).HasMaxLength(15);
builder.Property(x => x.FatherName).HasMaxLength(100);
builder.Property(x => x.PlaceOfIssue).HasMaxLength(100);
builder.Property(x => x.InsuranceCode).HasMaxLength(10);
}
}