BondEarlyRedemptionConfiguration.cs 1.9 KB

12345678910111213141516171819202122232425262728
  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 BondEarlyRedemptionConfiguration : IEntityTypeConfiguration<BondEarlyRedemption>
  6. {
  7. public void Configure(EntityTypeBuilder<BondEarlyRedemption> builder)
  8. {
  9. builder.ToTable(nameof(BondEarlyRedemption), t => t.HasComment("SEIBro 채권 조기상환 정보 (getBondOptionXrcInfo) — Call/Put 옵션 행사 조기상환. 조기상환일 날짜 스윕"));
  10. builder.HasKey(x => x.ID);
  11. builder.HasIndex(x => new { x.Isin, x.ErlyRedDt }).IsUnique();
  12. builder.HasIndex(x => x.ErlyRedDt);
  13. builder.Property(x => x.Isin).HasMaxLength(12).IsRequired().HasComment("종목코드 (ISIN)");
  14. builder.Property(x => x.KorSecnNm).HasMaxLength(100).HasComment("한글종목명 (KOR_SECN_NM)");
  15. builder.Property(x => x.XrcBeginDt).HasComment("행사시작일 (XRC_BEGIN_DT)");
  16. builder.Property(x => x.XrcExpryDt).HasComment("행사종료일 (XRC_EXPRY_DT)");
  17. builder.Property(x => x.ErlyRedDt).IsRequired().HasComment("조기상환일 (ERLY_RED_DT)");
  18. builder.Property(x => x.OptionTpcd).HasMaxLength(4).HasComment("옵션구분코드 (OPTION_TPCD)");
  19. builder.Property(x => x.ApliIrate).HasColumnType("decimal(15,10)").HasComment("적용이자율 (APLI_IRATE)");
  20. builder.Property(x => x.ErlyRedamtVal).HasColumnType("decimal(20,2)").HasComment("조기상환금액 (ERLY_REDAMT_VAL)");
  21. builder.Property(x => x.IntPayAmt).HasColumnType("decimal(20,2)").HasComment("이자지급금액 (INT_PAY_AMT)");
  22. builder.Property(x => x.IssuRema).HasColumnType("decimal(20,2)").HasComment("최근발행잔액 (ISSU_REMA)");
  23. builder.Property(x => x.XrcRatio).HasColumnType("decimal(15,10)").HasComment("행사비율 (XRC_RATIO)");
  24. }
  25. }