using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class DerivAssetExerciseConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(DerivAssetExercise), t => t.HasComment("SEIBro 파생결합증권 기초자산 행사정보 (getAssetXrcInfo) — 행사기준비율·행사가격. AssetSeq 로 DerivAsset 연계")); builder.HasKey(x => x.ID); builder.HasIndex(x => new { x.Isin, x.AssetSeq, x.XrcStdSeq }).IsUnique(); builder.Property(x => x.Isin).HasMaxLength(12).IsRequired().HasComment("종목코드 (ISIN, 스탬핑)"); builder.Property(x => x.AssetSeq).HasComment("자산일련번호 (ASSET_SEQ)"); builder.Property(x => x.XrcStdSeq).HasComment("행사기준일련번호 (XRC_STD_SEQ)"); builder.Property(x => x.XrcStdRatio).HasColumnType("decimal(8,3)").HasComment("행사기준비율 % (XRC_STD_RATIO)"); builder.Property(x => x.XrcPrice).HasColumnType("decimal(28,10)").HasComment("행사가격 (XRC_PRICE)"); } }