CdMasterConfiguration.cs 1.9 KB

1234567891011121314151617181920212223242526272829
  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 CdMasterConfiguration : IEntityTypeConfiguration<CdMaster>
  6. {
  7. public void Configure(EntityTypeBuilder<CdMaster> builder)
  8. {
  9. builder.ToTable(nameof(CdMaster), t => t.HasComment("SEIBro CD 종목 정보 (getCDInfo) — 발행금액·할인율·이자지급방식·만기. 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.FirstIssuAmt).HasColumnType("decimal(24,4)").HasComment("최초발행금액 (FIRST_ISSU_AMT)");
  17. builder.Property(x => x.IssuWhcd).HasMaxLength(1).HasComment("발행방법코드 (ISSU_WHCD)");
  18. builder.Property(x => x.FaceAmt).HasColumnType("decimal(20,2)").HasComment("액면금액 (FACE_AMT)");
  19. builder.Property(x => x.SaleAmt).HasColumnType("decimal(20,2)").HasComment("매출금액 (SALE_AMT)");
  20. builder.Property(x => x.DiscnRate).HasColumnType("decimal(15,10)").HasComment("할인율 (DISCN_RATE)");
  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) — CD 상환일");
  24. builder.Property(x => x.EltscYn).HasComment("전자증권 여부 (ELTSC_YN)");
  25. }
  26. }