using ODMO.Commons.DTOs.Character; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace ODMO.Infrastructure.ContextConfiguration.Character { public class CharacterSealListConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder .ToTable("SealList", "Character") .HasKey(x => x.Id); builder .Property(x => x.SealLeaderId) .HasColumnType("smallint") .HasDefaultValue(0) .IsRequired(); builder .HasMany(x => x.Seals) .WithOne(x => x.SealList) .HasForeignKey(x => x.SealListId); } } }