using AccountManagement.Domain.AccountLeftWorkAgg; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace AccountMangement.Infrastructure.EFCore.Mappings; public class AccountLeftWorkMapping : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("AccountLeftWork"); builder.HasKey(x => x.id); builder.Property(x => x.id); builder.Property(x => x.StartWorkGr); builder.Property(x => x.LeftWorkGr); builder.HasOne(x => x.Account) .WithMany(x => x.AccountLeftWorkList) .HasForeignKey(x => x.AccountId); } }