23 lines
727 B
C#
23 lines
727 B
C#
using Company.Domain.EmployeeBankInformationAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace CompanyManagment.EFCore.Mapping
|
|
{
|
|
public class EmployeeBankInformationMapping:IEntityTypeConfiguration<EmployeeBankInformation>
|
|
{
|
|
|
|
public void Configure(EntityTypeBuilder<EmployeeBankInformation> builder)
|
|
{
|
|
builder.ToTable("EmployeeBankInformationSet");
|
|
|
|
builder.Property(x => x.BankAccountNumber).HasMaxLength(20);
|
|
builder.Property(x => x.CardNumber).HasMaxLength(16);
|
|
builder.Property(x => x.ShebaNumber).HasMaxLength(26);
|
|
|
|
builder.HasOne(x => x.Employee).WithMany(x => x.EmployeeBankInformationList)
|
|
.HasForeignKey(x => x.EmployeeId);
|
|
}
|
|
}
|
|
}
|