DividendScheduleConfiguration.cs 2.1 KB

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