| 12345678910111213141516171819202122232425262728293031 |
- using Domain.Entities.Stocks;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Metadata.Builders;
- namespace Infrastructure.Persistence.Configurations.Stocks;
- public sealed class ConvertibleBondTargetConfiguration : IEntityTypeConfiguration<ConvertibleBondTarget>
- {
- public void Configure(EntityTypeBuilder<ConvertibleBondTarget> builder)
- {
- builder.ToTable(nameof(ConvertibleBondTarget), t => t.HasComment("SEIBro 주식관련사채 행사대상 주식정보 (getXrcStkStatInfo) — CB/BW/EB 행사대상·행사가·행사비율. rolling per-채권ISIN. 필드 매핑은 스펙 기준(빈 샘플)"));
- builder.HasKey(x => x.ID);
- builder.HasIndex(x => new { x.BondIsin, x.XrcStkIsin }).IsUnique();
- builder.HasIndex(x => x.XrcStkIsin);
- builder.Property(x => x.BondIsin).HasMaxLength(12).IsFixedLength().IsRequired().HasComment("채권 종목번호 (BOND_ISIN)");
- builder.Property(x => x.BondSecnNm).HasMaxLength(100).HasComment("채권 종목명 (BOND_SECN_NM)");
- builder.Property(x => x.BondKindNm).HasMaxLength(10).HasComment("채권종류코드 (BOND_KIND_NM) — EB/CB/BW");
- builder.Property(x => x.XrcStkIsin).HasMaxLength(12).IsFixedLength().IsRequired().HasComment("행사주식종목번호 (XRC_STK_ISIN)");
- builder.Property(x => x.StkSecnNm).HasMaxLength(100).HasComment("주식 종목명 (STK_SECN_NM)");
- builder.Property(x => x.WrtbIsin).HasMaxLength(12).HasComment("신주인수권증권종목번호 (WRTB_ISIN)");
- builder.Property(x => x.WrtbSecnNm).HasMaxLength(100).HasComment("신주인수권증권명 (WRTB_SECN_NM)");
- // 스펙 XRC_RATIO NUMBER(20,10)/XRC_PRICE NUMBER(17,7) — decimal(28,10) 로 안전 설정
- builder.Property(x => x.XrcRatio).HasPrecision(28, 10).HasComment("행사비율 (XRC_RATIO)");
- builder.Property(x => x.XrcPrice).HasPrecision(28, 10).HasComment("행사가격 (XRC_PRICE)");
- builder.Property(x => x.SetaccEndtermLimitDays).HasComment("결산기말제한일수 (SETACC_ENDTERM_LIMIT_DAYS)");
- builder.Property(x => x.NewstkAllocDdBfLimitDays).HasComment("신주배정일전제한일수 (NEWSTK_ALOC_DD_BF_LIMIT_DAYS)");
- builder.Property(x => x.DmanLimitRsnContent).HasMaxLength(500).HasComment("청구제한사유내용 (DMAN_LIMIT_RSN_CONTENT)");
- }
- }
|