| 123456789101112131415161718192021222324252627282930 |
- using Domain.Entities.Stocks;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Metadata.Builders;
- namespace Infrastructure.Persistence.Configurations.Stocks;
- public sealed class LockupEventConfiguration : IEntityTypeConfiguration<LockupEvent>
- {
- public void Configure(EntityTypeBuilder<LockupEvent> builder)
- {
- builder.ToTable(nameof(LockupEvent), t => t.HasComment("SEIBro 의무보호예수/반환 (getSafeDpDutyDepoStatus) — 락업 예수/반환 일정·수량·사유"));
- builder.HasKey(x => x.ID);
- builder.HasIndex(x => new { x.IssucoCustno, x.ShotnIsin, x.SafedpDt, x.OccrSeq, x.DutySafedpRacd }).IsUnique();
- builder.HasIndex(x => x.SafedpDt);
- builder.HasIndex(x => x.ReturnDt);
- builder.Property(x => x.IssucoCustno).IsRequired().HasComment("발행회사 고객번호 (ISSUCO_CUSTNO)");
- builder.Property(x => x.KorSecnNm).HasMaxLength(100).IsRequired().HasComment("한글종목명 (KOR_SECN_NM)");
- builder.Property(x => x.SecnKacd).HasMaxLength(20).HasComment("종목종류 (SECN_KACD — 실응답은 명칭 문자열)");
- builder.Property(x => x.ShotnIsin).HasMaxLength(12).IsRequired().HasComment("단축코드 (SHOTN_ISIN)");
- builder.Property(x => x.MartTpcd).HasMaxLength(2).HasComment("시장구분 (MART_TPCD)");
- builder.Property(x => x.OccrSeq).HasMaxLength(1).IsRequired().HasComment("업무구분 (OCCR_SEQ) — 1예수 2반환");
- builder.Property(x => x.SafedpDt).IsRequired().HasComment("의무보호예수일 (SAFEDP_DT)");
- builder.Property(x => x.SafedpQty).HasComment("예수주식수 (SAFEDP_QTY)");
- builder.Property(x => x.DutySafedpRacd).HasMaxLength(2).IsRequired().HasComment("보호예수사유코드 (DUTY_SAFEDP_RACD)");
- builder.Property(x => x.ReturnDt).HasComment("반환일 (RETURN_DT)");
- builder.Property(x => x.ReturnQty).HasComment("반환주식수 (RETURN_QTY)");
- builder.Property(x => x.TotalStkCnt).HasComment("총발행주식수 (TOTAL_STK_CNT)");
- }
- }
|