using Domain.Entities.Store; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Store; public sealed class GameCategoryConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(GameCategory), t => t.HasComment("게임 카테고리 코드")); builder.HasKey(x => x.ID); builder.Property(x => x.KorName).HasMaxLength(100).IsRequired().HasComment("카테고리 한글명"); builder.Property(x => x.EngName).HasMaxLength(100).HasComment("카테고리 영문명"); builder.Property(x => x.Order).IsRequired(); builder.Property(x => x.IsActive).IsRequired(); builder.Property(x => x.CreatedAt).IsRequired(); builder.Property(x => x.UpdatedAt); builder.HasIndex(x => x.KorName).IsUnique(); builder.HasIndex(x => new { x.IsActive, x.Order }); } }