using Domain.Entities.Chat; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Chat; public sealed class ChatRoomConfigConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(ChatRoomConfig), t => t.HasComment("채팅방 설정 (main | stock:{code})")); builder.HasKey(x => x.RoomKey); builder.Property(x => x.RoomKey).HasMaxLength(20).IsRequired().HasComment("룸 키"); builder.Property(x => x.IsActive).IsRequired().HasComment("활성 여부 (종목방 단계 오픈 게이트)"); builder.Property(x => x.SlowModeSeconds).IsRequired().HasComment("슬로우 모드 (초)"); builder.Property(x => x.Notice).HasMaxLength(200).HasComment("상단 고정 공지"); builder.Property(x => x.UpdatedAt).IsRequired(); } }