26 lines
915 B
C#
26 lines
915 B
C#
using Company.Domain.GroupPlanJobItemAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace CompanyManagment.EFCore.Mapping;
|
|
|
|
public class GroupPlanJobItemMapping : IEntityTypeConfiguration<GroupPlanJobItem>
|
|
{
|
|
public void Configure(EntityTypeBuilder<GroupPlanJobItem> builder)
|
|
{
|
|
builder.ToTable("GroupPlanJobItems");
|
|
builder.HasKey(x => x.id);
|
|
|
|
builder.Property(x => x.JobName).HasMaxLength(150);
|
|
builder.Property(x => x.GroupNo).HasMaxLength(2);
|
|
builder.Property(x => x.JobId);
|
|
builder.Property(x => x.GroupPlanId);
|
|
builder.Property(x => x.WorkshopPlanId);
|
|
builder.Property(x => x.WorkshopId);
|
|
builder.Property(x => x.CreationDate);
|
|
|
|
builder.HasOne(x => x.GroupPlan)
|
|
.WithMany(x => x.GroupPlanJobItems)
|
|
.HasForeignKey(x => x.GroupPlanId);
|
|
}
|
|
} |