SeibroSweptDateConfiguration.cs 1.1 KB

1234567891011121314151617181920
  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 SeibroSweptDateConfiguration : IEntityTypeConfiguration<SeibroSweptDate>
  6. {
  7. public void Configure(EntityTypeBuilder<SeibroSweptDate> builder)
  8. {
  9. builder.ToTable(nameof(SeibroSweptDate), t => t.HasComment("SEIBro 날짜 스윕 조회 완료 마커 (0행 포함) — 리뷰 결함 #1: 조용한 날 재조회 제거용"));
  10. builder.HasKey(x => x.ID);
  11. builder.HasIndex(x => new { x.JobKey, x.Date, x.Discriminator }).IsUnique();
  12. builder.Property(x => x.JobKey).HasMaxLength(40).IsRequired().HasComment("수집 job 식별자");
  13. builder.Property(x => x.Date).IsRequired().HasComment("스윕 대상 날짜 (요청 파라미터 날짜)");
  14. builder.Property(x => x.Discriminator).HasMaxLength(20).IsRequired().HasComment("스윕 축 구분 (tpcd/kacd/nation 등, 없으면 빈 문자열)");
  15. builder.Property(x => x.SweptAt).IsRequired().HasComment("조회 완료 시각 (UTC, 0행 포함)");
  16. }
  17. }