CpMasterConfiguration.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Domain.Entities.Stocks;
  2. using Microsoft.EntityFrameworkCore;
  3. using Microsoft.EntityFrameworkCore.Metadata.Builders;
  4. namespace Infrastructure.Persistence.Configurations.Stocks;
  5. public sealed class CpMasterConfiguration : IEntityTypeConfiguration<CpMaster>
  6. {
  7. public void Configure(EntityTypeBuilder<CpMaster> builder)
  8. {
  9. builder.ToTable(nameof(CpMaster), t => t.HasComment("SEIBro CP 종목 정보 (getCPInfo) — 발행·할인기관·지급은행·원천징수·신용등급 4사. PK Isin"));
  10. builder.HasKey(x => x.Isin);
  11. builder.HasIndex(x => x.IssuDt);
  12. builder.Property(x => x.Isin).HasMaxLength(12).HasComment("종목코드 (ISIN, 요청값 스탬핑)");
  13. builder.Property(x => x.IssucoCustno).HasComment("발행사 번호 (ISSUCO_CUSTNO)");
  14. builder.Property(x => x.KorSecnNm).HasMaxLength(100).HasComment("한글종목명 (KOR_SECN_NM)");
  15. builder.Property(x => x.IssuCurCd).HasMaxLength(3).HasComment("발행통화코드 (ISSU_CUR_CD)");
  16. builder.Property(x => x.IssuAmt).HasColumnType("decimal(24,4)").HasComment("발행금액 (ISSU_AMT)");
  17. builder.Property(x => x.SecnKacd).HasMaxLength(4).HasComment("종목종류코드 (SECN_KACD)");
  18. builder.Property(x => x.BillCacd).HasMaxLength(1).HasComment("어음분류코드 (BILL_CACD)");
  19. builder.Property(x => x.IssuWhcd).HasMaxLength(1).HasComment("발행방법코드 (ISSU_WHCD)");
  20. builder.Property(x => x.SaleDt).HasComment("매출일자 (SALE_DT)");
  21. builder.Property(x => x.IntPayMannTpcd).HasMaxLength(1).HasComment("이자지급방식구분코드 (INT_PAY_MANN_TPCD)");
  22. builder.Property(x => x.IssuDt).HasComment("발행일자 (ISSU_DT)");
  23. builder.Property(x => x.XpirDt).HasComment("만기일자 (XPIR_DT)");
  24. builder.Property(x => x.DiscnOrgCustno).HasComment("할인기관고객번호 (DISCN_ORG_CUSTNO)");
  25. builder.Property(x => x.DiscnOrdNm).HasMaxLength(100).HasComment("할인기관명 (DISCN_ORD_NM)");
  26. builder.Property(x => x.PayBankBrono).HasComment("지급은행지점번호 (PAY_BANK_BRONO)");
  27. builder.Property(x => x.BankNm).HasMaxLength(100).HasComment("지급은행명 (BANK_NM)");
  28. builder.Property(x => x.WholdTpcd).HasMaxLength(1).HasComment("원천징수구분코드 (WHOLD_TPCD)");
  29. builder.Property(x => x.KisValatGrdCd).HasMaxLength(3).HasComment("KIS평가등급코드 (KIS_VALAT_GRD_CD)");
  30. builder.Property(x => x.NiceValatGrdCd).HasMaxLength(3).HasComment("NICE평가등급코드 (NICE_VALAT_GRD_CD)");
  31. builder.Property(x => x.SciValatGrdCd).HasMaxLength(3).HasComment("서울신용평가등급코드 (SCI_VALAT_GRD_CD)");
  32. builder.Property(x => x.KrValatGrdCd).HasMaxLength(3).HasComment("한국기업평가등급코드 (KR_VALAT_GRD_CD)");
  33. }
  34. }