23 lines
919 B
C#
23 lines
919 B
C#
using Company.Domain.TemporaryClientRegistrationAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace CompanyManagment.EFCore.Mapping;
|
|
|
|
public class InstitutionContractContactInfoTempMapping : IEntityTypeConfiguration<InstitutionContractContactInfoTemp>
|
|
{
|
|
public void Configure(EntityTypeBuilder<InstitutionContractContactInfoTemp> builder)
|
|
{
|
|
builder.ToTable("InstitutionContractContactInfoTemp");
|
|
builder.HasKey(x => x.id);
|
|
|
|
builder.Property(x => x.FullName).HasMaxLength(50);
|
|
builder.Property(x => x.PhoneNumber).HasMaxLength(20);
|
|
builder.Property(x => x.PhoneType).HasMaxLength(20);
|
|
builder.Property(x => x.Position).HasMaxLength(50);
|
|
builder.HasOne(x => x.InstitutionContractTemp)
|
|
.WithMany(x => x.ContactInfoList)
|
|
.HasForeignKey(x => x.InstitutionContractTempId);
|
|
}
|
|
}
|