| 1234567891011121314151617181920212223 |
- using Domain.Entities.Store;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Metadata.Builders;
- namespace Infrastructure.Persistence.Configurations.Store;
- public sealed class GameLanguageSupportConfiguration : IEntityTypeConfiguration<GameLanguageSupport>
- {
- public void Configure(EntityTypeBuilder<GameLanguageSupport> builder)
- {
- builder.ToTable(nameof(GameLanguageSupport), t => t.HasComment("게임별 언어 지원 (인터페이스/풀오디오/자막)"));
- builder.HasKey(x => new { x.GameID, x.GameLanguageID });
- builder.HasOne(x => x.Game).WithMany(x => x.GameLanguageSupport).HasForeignKey(x => x.GameID).OnDelete(DeleteBehavior.Cascade);
- builder.HasOne(x => x.GameLanguage).WithMany(x => x.GameLanguageSupport).HasForeignKey(x => x.GameLanguageID).OnDelete(DeleteBehavior.Cascade);
- builder.Property(x => x.Interface).IsRequired().HasComment("인터페이스 지원");
- builder.Property(x => x.FullAudio).IsRequired().HasComment("풀 오디오(음성) 지원");
- builder.Property(x => x.Subtitles).IsRequired().HasComment("자막 지원");
- builder.HasIndex(x => x.GameLanguageID);
- }
- }
|