DerivMasterConfiguration.cs 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 DerivMasterConfiguration : IEntityTypeConfiguration<DerivMaster>
  6. {
  7. public void Configure(EntityTypeBuilder<DerivMaster> builder)
  8. {
  9. builder.ToTable(nameof(DerivMaster), t => t.HasComment("SEIBro 파생결합증권 종목 정보 (getDerivCombiIsinInfo) — 원금보전·만기·발행잔량·기초자산수. ELS/DLS 상세 마스터"));
  10. builder.HasKey(x => x.Isin);
  11. builder.HasIndex(x => x.IssucoCustno);
  12. builder.HasIndex(x => x.XpirDt);
  13. builder.Property(x => x.Isin).HasMaxLength(12).HasComment("종목코드 (ISIN)");
  14. builder.Property(x => x.KorSecnNm).HasMaxLength(100).HasComment("한글종목명 (KOR_SECN_NM)");
  15. builder.Property(x => x.IssucoCustno).HasComment("발행회사고객번호 (ISSUCO_CUSTNO)");
  16. builder.Property(x => x.SecnKanm).HasMaxLength(20).HasComment("종목구분명 (SECN_KANM) — ELS/ELB/ELW/DLS/DLB/ETN");
  17. builder.Property(x => x.IssuCurCd).HasMaxLength(3).HasComment("발행통화코드 (ISSU_CUR_CD)");
  18. builder.Property(x => x.RecuWhcd).HasMaxLength(2).HasComment("모집방법코드 (RECU_WHCD) — 11공모 21사모");
  19. builder.Property(x => x.FirstIssuQty).HasColumnType("decimal(20,2)").HasComment("최초발행수량 (FIRST_ISSU_QTY)");
  20. builder.Property(x => x.IssuRemq).HasColumnType("decimal(20,2)").HasComment("발행잔량 (ISSU_REMQ)");
  21. builder.Property(x => x.PayinAmtRatio).HasColumnType("decimal(15,10)").HasComment("납입금액비율 (PAYIN_AMT_RATIO)");
  22. builder.Property(x => x.PayinAmt).HasColumnType("decimal(20,2)").HasComment("납입금액 (PAYIN_AMT)");
  23. builder.Property(x => x.IssuDt).HasComment("발행일자 (ISSU_DT)");
  24. builder.Property(x => x.ContDt).HasComment("계약일자 (CONT_DT)");
  25. builder.Property(x => x.XpirDt).HasComment("만기일자 (XPIR_DT)");
  26. builder.Property(x => x.MidredPossYn).HasComment("중도상환가능여부 (MIDRED_POSS_YN)");
  27. builder.Property(x => x.RedDt).HasComment("상환일자 (RED_DT)");
  28. builder.Property(x => x.DerisecExerTpcd).HasMaxLength(1).HasComment("파생증권권리행사구분코드 (DERISEC_EXER_TPCD) — 2만기 3조기");
  29. builder.Property(x => x.PrcpPrsvTpcd).HasMaxLength(1).HasComment("원금보전구분코드 (PRCP_PRSV_TPCD) — 1보장 2부분 3비보장");
  30. builder.Property(x => x.PrcpPrsvRate).HasColumnType("decimal(8,3)").HasComment("원금보전율 (PRCP_PRSV_RATE)");
  31. builder.Property(x => x.ColatSetupTpcd).HasMaxLength(1).HasComment("담보설정구분코드 (COLAT_SETUP_TPCD) — 1설정 2미설정");
  32. builder.Property(x => x.BassetCnt).HasComment("기초자산 개수 (BASSET_CNT)");
  33. builder.Property(x => x.MmPayYn).HasComment("월지급여부 (MM_PAY_YN)");
  34. }
  35. }