using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class ConvertibleExerciseConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(ConvertibleExercise), t => t.HasComment("SEIBro 주식관련사채 행사내역 (getXrcStkOptionXrcInfo) — CB/BW/EB 권리행사. 날짜 스윕(권리행사일) window delete+insert. 필드 매핑은 스펙 기준(빈 샘플)")); builder.HasKey(x => x.ID); builder.HasIndex(x => x.RgtStdDt); builder.HasIndex(x => x.BondIsin); builder.HasIndex(x => x.XrcStkIsin); builder.Property(x => x.BondIsin).HasMaxLength(12).IsFixedLength().IsRequired().HasComment("채권 종목코드 (BOND_ISIN)"); builder.Property(x => x.BondKorSecnNm).HasMaxLength(100).HasComment("채권 한글종목명 (BOND_KOR_SECN_NM)"); builder.Property(x => x.BondKindNm).HasMaxLength(10).HasComment("채권종류코드 (BOND_KIND_NM) — EB/CB/BW"); builder.Property(x => x.XrcStkIsin).HasMaxLength(12).HasComment("행사주식 종목코드 (XRC_STK_ISIN)"); builder.Property(x => x.StkKorSecnNm).HasMaxLength(100).HasComment("행사주식명 (STK_KOR_SECN_NM)"); builder.Property(x => x.RgtStdDt).IsRequired().HasComment("권리행사일 (RGT_STD_DT)"); builder.Property(x => x.XrcPossBeginDt).HasComment("행사시작일 (XRC_POSS_BEGIN_DT)"); builder.Property(x => x.XrcPossExpryDt).HasComment("행사종료일 (XRC_POSS_EXPRY_DT)"); // 스펙 XRC_AMT/XRC_QTY/XRC_PRICE NUMBER(17,7) — decimal(28,10) 로 안전 설정 builder.Property(x => x.XrcAmt).HasPrecision(28, 10).HasComment("행사금액 (XRC_AMT)"); builder.Property(x => x.XrcQty).HasPrecision(28, 10).HasComment("행사주수 (XRC_QTY)"); builder.Property(x => x.XrcPrice).HasPrecision(28, 10).HasComment("행사가격 (XRC_PRICE)"); builder.Property(x => x.ListDt).HasComment("주식상장일 (LIST_DT)"); } }