using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class BondEarlyRedemptionConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(BondEarlyRedemption), t => t.HasComment("SEIBro 채권 조기상환 정보 (getBondOptionXrcInfo) — Call/Put 옵션 행사 조기상환. 조기상환일 날짜 스윕")); builder.HasKey(x => x.ID); builder.HasIndex(x => new { x.Isin, x.ErlyRedDt }).IsUnique(); builder.HasIndex(x => x.ErlyRedDt); builder.Property(x => x.Isin).HasMaxLength(12).IsRequired().HasComment("종목코드 (ISIN)"); builder.Property(x => x.KorSecnNm).HasMaxLength(100).HasComment("한글종목명 (KOR_SECN_NM)"); builder.Property(x => x.XrcBeginDt).HasComment("행사시작일 (XRC_BEGIN_DT)"); builder.Property(x => x.XrcExpryDt).HasComment("행사종료일 (XRC_EXPRY_DT)"); builder.Property(x => x.ErlyRedDt).IsRequired().HasComment("조기상환일 (ERLY_RED_DT)"); builder.Property(x => x.OptionTpcd).HasMaxLength(4).HasComment("옵션구분코드 (OPTION_TPCD)"); builder.Property(x => x.ApliIrate).HasColumnType("decimal(15,10)").HasComment("적용이자율 (APLI_IRATE)"); builder.Property(x => x.ErlyRedamtVal).HasColumnType("decimal(20,2)").HasComment("조기상환금액 (ERLY_REDAMT_VAL)"); builder.Property(x => x.IntPayAmt).HasColumnType("decimal(20,2)").HasComment("이자지급금액 (INT_PAY_AMT)"); builder.Property(x => x.IssuRema).HasColumnType("decimal(20,2)").HasComment("최근발행잔액 (ISSU_REMA)"); builder.Property(x => x.XrcRatio).HasColumnType("decimal(15,10)").HasComment("행사비율 (XRC_RATIO)"); } }