using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class CdMasterConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(CdMaster), t => t.HasComment("SEIBro CD 종목 정보 (getCDInfo) — 발행금액·할인율·이자지급방식·만기. PK Isin")); builder.HasKey(x => x.Isin); builder.HasIndex(x => x.IssuDt); builder.Property(x => x.Isin).HasMaxLength(12).HasComment("종목코드 (ISIN, 요청값 스탬핑)"); builder.Property(x => x.IssucoCustno).HasComment("발행사 번호 (ISSUCO_CUSTNO)"); builder.Property(x => x.KorSecnNm).HasMaxLength(100).HasComment("한글종목명 (KOR_SECN_NM)"); builder.Property(x => x.IssuCurCd).HasMaxLength(3).HasComment("발행통화코드 (ISSU_CUR_CD)"); builder.Property(x => x.FirstIssuAmt).HasColumnType("decimal(24,4)").HasComment("최초발행금액 (FIRST_ISSU_AMT)"); builder.Property(x => x.IssuWhcd).HasMaxLength(1).HasComment("발행방법코드 (ISSU_WHCD)"); builder.Property(x => x.FaceAmt).HasColumnType("decimal(20,2)").HasComment("액면금액 (FACE_AMT)"); builder.Property(x => x.SaleAmt).HasColumnType("decimal(20,2)").HasComment("매출금액 (SALE_AMT)"); builder.Property(x => x.DiscnRate).HasColumnType("decimal(15,10)").HasComment("할인율 (DISCN_RATE)"); builder.Property(x => x.IntPayMannTpcd).HasMaxLength(1).HasComment("이자지급방식구분코드 (INT_PAY_MANN_TPCD)"); builder.Property(x => x.IssuDt).HasComment("발행일자 (ISSU_DT)"); builder.Property(x => x.XpirDt).HasComment("만기일자 (XPIR_DT) — CD 상환일"); builder.Property(x => x.EltscYn).HasComment("전자증권 여부 (ELTSC_YN)"); } }