EstbMasterConfiguration.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132
  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 EstbMasterConfiguration : IEntityTypeConfiguration<EstbMaster>
  6. {
  7. public void Configure(EntityTypeBuilder<EstbMaster> builder)
  8. {
  9. builder.ToTable(nameof(EstbMaster), t => t.HasComment("SEIBro 전자단기사채 종목 정보 (getESTBInfo) — 발행·만기·일물·모집방법·신용등급 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.EstbKacd).HasMaxLength(1).HasComment("전자단기사채종류코드 (ESTB_KACD)");
  15. builder.Property(x => x.KorSecnNm).HasMaxLength(100).HasComment("한글종목명 (KOR_SECN_NM)");
  16. builder.Property(x => x.IssuCurCd).HasMaxLength(3).HasComment("발행통화코드 (ISSU_CUR_CD)");
  17. builder.Property(x => x.IssuAmt).HasColumnType("decimal(20,2)").HasComment("발행금액 (ISSU_AMT)");
  18. builder.Property(x => x.RecuWhcd).HasMaxLength(2).HasComment("모집방법코드 (RECU_WHCD)");
  19. builder.Property(x => x.IssuDt).HasComment("발행일자 (ISSU_DT)");
  20. builder.Property(x => x.XpirDt).HasComment("만기일자 (XPIR_DT)");
  21. builder.Property(x => x.Dayobj).HasMaxLength(8).HasComment("일물 (DAYOBJ) — 만기일-발행일");
  22. builder.Property(x => x.WholdYn).HasComment("원천징수여부 (WHOLD_YN)");
  23. builder.Property(x => x.GrorgYn).HasComment("보증여부 (GRORG_YN)");
  24. builder.Property(x => x.KisValatGrdCd).HasMaxLength(3).HasComment("KIS평가등급코드 (KIS_VALAT_GRD_CD)");
  25. builder.Property(x => x.NiceValatGrdCd).HasMaxLength(3).HasComment("NICE평가등급코드 (NICE_VALAT_GRD_CD)");
  26. builder.Property(x => x.SciValatGrdCd).HasMaxLength(3).HasComment("서울신용평가등급코드 (SCI_VALAT_GRD_CD)");
  27. builder.Property(x => x.KrValatGrdCd).HasMaxLength(3).HasComment("한국기업평가등급코드 (KR_VALAT_GRD_CD)");
  28. }
  29. }