ForeignSettlementNationConfiguration.cs 1.6 KB

1234567891011121314151617181920212223
  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 ForeignSettlementNationConfiguration : IEntityTypeConfiguration<ForeignSettlementNation>
  6. {
  7. public void Configure(EntityTypeBuilder<ForeignSettlementNation> builder)
  8. {
  9. builder.ToTable(nameof(ForeignSettlementNation), t => t.HasComment("SEIBro 국가별 외화증권 결제현황 (getNationFrsecSetlInfo) — KSD 결제 매수/매도 결제건수·금액(USD), 국가×매매×종목구분별"));
  10. builder.HasKey(x => x.ID);
  11. builder.HasIndex(x => new { x.SetlDt, x.NationCd, x.IntlBizCacd, x.SecnTpcd }).IsUnique();
  12. builder.HasIndex(x => new { x.NationCd, x.SetlDt });
  13. builder.Property(x => x.SetlDt).IsRequired().HasComment("결제일자 (SETL_DT, 스탬핑)");
  14. builder.Property(x => x.NationCd).HasMaxLength(2).IsRequired().HasComment("국가코드 (NATION_CD, 스탬핑) — US/JP/HK/CN/E1 등 43종");
  15. builder.Property(x => x.IntlBizCacd).HasMaxLength(4).IsRequired().HasComment("국제업무분류코드 (INTL_BIZ_CACD) — 1110매수 1120매도");
  16. builder.Property(x => x.SecnTpcd).HasMaxLength(2).IsRequired().HasComment("종목구분코드 (SECN_TPCD) — 71외화주식~78외화수익증권");
  17. builder.Property(x => x.SetlCount).HasComment("결제건수 (SETL_COUNT)");
  18. builder.Property(x => x.FrsecSetlAmt).HasColumnType("decimal(30,10)").HasComment("외화증권결제금액 (FRSEC_SETL_AMT) — USD, NUMBER(26,10)");
  19. }
  20. }