using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class ShortTermIssuanceConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(ShortTermIssuance), t => t.HasComment("SEIBro 단기금융증권 발행내역 (getShortmIssuInfo) — CD/CP/전단채. Cd/Cp/EstbMaster rolling 발견 소스")); builder.HasKey(x => x.ID); builder.HasIndex(x => x.Isin).IsUnique(); builder.HasIndex(x => new { x.SecnTpcd, x.IssuDt }); builder.Property(x => x.Isin).HasMaxLength(12).IsRequired().HasComment("종목코드 (ISIN)"); builder.Property(x => x.KorSecnNm).HasMaxLength(100).HasComment("한글종목명 (KOR_SECN_NM)"); builder.Property(x => x.IssucoCustno).HasComment("발행회사고객번호 (ISSUCO_CUSTNO)"); builder.Property(x => x.IssucoCustNm).HasMaxLength(100).HasComment("발행회사 명칭 (ISSUCO_CUST_NM)"); builder.Property(x => x.SecnTpcd).HasMaxLength(2).IsRequired().HasComment("종목구분코드 (SECN_TPCD, 요청값 스탬핑) — 12어음(CP) 13CD 14전단채"); builder.Property(x => x.IssuDt).IsRequired().HasComment("발행일자 (ISSU_DT, 요청값 스탬핑)"); } }