using Domain.Entities.Stocks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Stocks; public sealed class DividendScheduleConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(DividendSchedule), t => t.HasComment("SEIBro 배당일정 (getDivSchedulInfo) — 현금/주식/동시/무배당 일정·권리락일")); builder.HasKey(x => x.ID); builder.HasIndex(x => new { x.IssucoCustno, x.RgtStdDt, x.RgtRsnDetailSortCd }).IsUnique(); builder.HasIndex(x => x.RgtStdDt); builder.HasIndex(x => x.XrgtDt); builder.Property(x => x.IssucoCustno).IsRequired().HasComment("발행회사 고객번호 (ISSUCO_CUSTNO)"); builder.Property(x => x.RepSecnNm).HasMaxLength(100).IsRequired().HasComment("대표종목명 (REP_SECN_NM)"); builder.Property(x => x.RgtRacd).HasMaxLength(3).HasComment("권리사유코드 (RGT_RACD) — 103 배당/분배"); builder.Property(x => x.RgtRsnDetailSortCd).HasMaxLength(2).IsRequired().HasComment("권리사유세부유형코드 — 01주식 02현금 03동시 04무배당"); builder.Property(x => x.RgtStdDt).IsRequired().HasComment("권리기준일자 (RGT_STD_DT)"); builder.Property(x => x.AllocWhcd).HasMaxLength(1).HasComment("배정방법코드 (ALOC_WHCD)"); builder.Property(x => x.SetaccTpcd).HasMaxLength(1).HasComment("결산구분코드 (SETACC_TPCD)"); builder.Property(x => x.FixTpcd).HasMaxLength(1).HasComment("확정구분코드 (FIX_TPCD)"); builder.Property(x => x.RostCloseBeginDt).HasComment("명부폐쇄시작일자 (ROST_CLOSE_BEGIN_DT)"); builder.Property(x => x.RostCloseExpryDt).HasComment("명부폐쇄종료일자 (ROST_CLOSE_EXPRY_DT)"); builder.Property(x => x.XrgtDt).HasComment("권리락일자 (XRGT_DT)"); builder.Property(x => x.IsElectronicSecurity).HasComment("전자증권 여부 (ELTSC_YN)"); } }