using Company.Domain.RollCallEmployeeAgg; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace CompanyManagment.EFCore.Mapping; public class RollCallEmployeeMapping : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("RollCallEmployees"); builder.HasKey(x => x.id); builder.Property(x => x.WorkshopId); builder.Property(x => x.EmployeeId); builder.Property(x => x.EmployeeFullName).HasMaxLength(100); builder.Property(x => x.FName).HasMaxLength(50); builder.Property(x => x.LName).HasMaxLength(50); builder.Property(x => x.IsActiveString).HasMaxLength(5); builder.Property(x => x.HasUploadedImage).HasMaxLength(5); builder.HasMany(x => x.EmployeesStatus) .WithOne(x => x.RollCallEmployee) .HasForeignKey(x => x.RollCallEmployeeId); } }