using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class DerivRedemptionConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(DerivRedemption), t => t.HasComment("SEIBro 파생결합증권 상환종목 (getRedIsinInfo) — 상환일별 상환종목·수량. RedDt×종류 날짜 스윕")); builder.HasKey(x => x.ID); builder.HasIndex(x => new { x.Isin, x.RedDt, x.DerisecExerTpcd }).IsUnique(); builder.HasIndex(x => x.RedDt); builder.Property(x => x.Isin).HasMaxLength(12).IsRequired().HasComment("종목코드 (ISIN)"); builder.Property(x => x.DerisecExerTpcd).HasMaxLength(1).IsRequired().HasComment("파생증권권리행사구분코드 (DERISEC_EXER_TPCD) — 2만기 3조기"); builder.Property(x => x.RedQty).HasColumnType("decimal(20,2)").HasComment("상환수량 (RED_QTY)"); builder.Property(x => x.RedDt).IsRequired().HasComment("상환일자 (RED_DT, 스탬핑)"); builder.Property(x => x.SecnKacd).HasMaxLength(4).IsRequired().HasComment("종목종류코드 (SECN_KACD, 스탬핑) — 4101ELS 4102ELB 4301DLS 4302DLB"); } }