using Domain.Entities.Store; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Store; public class GameProductCatalogConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.HasIndex(x => new { x.GameID, x.ProductID }).IsUnique(); builder.ToTable(nameof(GameProductCatalog), x => x.HasComment("게임별 인앱 상품 SKU 정가 카탈로그 (API 결제 보고가 검증용)")); builder.HasKey(x => x.ID); builder.Property(x => x.ProductID).HasMaxLength(100).IsRequired(); builder.HasOne(x => x.Game).WithMany().HasForeignKey(x => x.GameID).OnDelete(DeleteBehavior.Cascade); } }