| 123456789101112131415161718192021 |
- using Domain.Entities.Stocks;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Metadata.Builders;
- namespace Infrastructure.Persistence.Configurations.Stocks;
- public sealed class SeibroIssuerCodeConfiguration : IEntityTypeConfiguration<SeibroIssuerCode>
- {
- public void Configure(EntityTypeBuilder<SeibroIssuerCode> builder)
- {
- builder.ToTable(nameof(SeibroIssuerCode), t => t.HasComment("SEIBro 시장별 단축코드↔발행회사번호 매핑 (getShotnByMart)"));
- builder.HasKey(x => x.ID);
- builder.HasIndex(x => new { x.Market, x.ShortCode }).IsUnique();
- builder.HasIndex(x => x.IssucoCustno);
- builder.Property(x => x.Market).HasMaxLength(2).IsFixedLength().IsRequired().HasComment("시장구분 (MART_TPCD) — 11유가/12코스닥/13K-OTC/14코넥스/50기타");
- builder.Property(x => x.ShortCode).HasMaxLength(12).IsRequired().HasComment("단축코드 (SHOTN_ISIN)");
- builder.Property(x => x.Name).HasMaxLength(100).IsRequired().HasComment("종목명 (KOR_SECN_NM)");
- builder.Property(x => x.IssucoCustno).IsRequired().HasComment("발행회사 고객번호 (ISSUCO_CUSTNO)");
- }
- }
|