using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class CpMasterConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(CpMaster), t => t.HasComment("SEIBro CP 종목 정보 (getCPInfo) — 발행·할인기관·지급은행·원천징수·신용등급 4사. 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.IssuAmt).HasColumnType("decimal(24,4)").HasComment("발행금액 (ISSU_AMT)"); builder.Property(x => x.SecnKacd).HasMaxLength(4).HasComment("종목종류코드 (SECN_KACD)"); builder.Property(x => x.BillCacd).HasMaxLength(1).HasComment("어음분류코드 (BILL_CACD)"); builder.Property(x => x.IssuWhcd).HasMaxLength(1).HasComment("발행방법코드 (ISSU_WHCD)"); builder.Property(x => x.SaleDt).HasComment("매출일자 (SALE_DT)"); 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)"); builder.Property(x => x.DiscnOrgCustno).HasComment("할인기관고객번호 (DISCN_ORG_CUSTNO)"); builder.Property(x => x.DiscnOrdNm).HasMaxLength(100).HasComment("할인기관명 (DISCN_ORD_NM)"); builder.Property(x => x.PayBankBrono).HasComment("지급은행지점번호 (PAY_BANK_BRONO)"); builder.Property(x => x.BankNm).HasMaxLength(100).HasComment("지급은행명 (BANK_NM)"); builder.Property(x => x.WholdTpcd).HasMaxLength(1).HasComment("원천징수구분코드 (WHOLD_TPCD)"); builder.Property(x => x.KisValatGrdCd).HasMaxLength(3).HasComment("KIS평가등급코드 (KIS_VALAT_GRD_CD)"); builder.Property(x => x.NiceValatGrdCd).HasMaxLength(3).HasComment("NICE평가등급코드 (NICE_VALAT_GRD_CD)"); builder.Property(x => x.SciValatGrdCd).HasMaxLength(3).HasComment("서울신용평가등급코드 (SCI_VALAT_GRD_CD)"); builder.Property(x => x.KrValatGrdCd).HasMaxLength(3).HasComment("한국기업평가등급코드 (KR_VALAT_GRD_CD)"); } }