PaymentReconcileLogConfiguration.cs 997 B

123456789101112131415161718192021222324
  1. using Domain.Entities.Payments;
  2. using Microsoft.EntityFrameworkCore;
  3. using Microsoft.EntityFrameworkCore.Metadata.Builders;
  4. namespace Infrastructure.Persistence.Configurations.Payments;
  5. public sealed class PaymentReconcileLogConfiguration : IEntityTypeConfiguration<PaymentReconcileLog>
  6. {
  7. public void Configure(EntityTypeBuilder<PaymentReconcileLog> builder)
  8. {
  9. builder.ToTable("PaymentReconcileLog", x => x.HasComment("PG 성공 후 저장 실패 대사 로그 (Phase 1.5)"));
  10. builder.HasKey(x => x.ID);
  11. builder.HasIndex(x => x.PaymentOrderID);
  12. builder.HasIndex(x => x.CreatedAt);
  13. builder.Property(x => x.PaymentOrderID).IsRequired();
  14. builder.Property(x => x.Kind).IsRequired();
  15. builder.Property(x => x.TransactionID).HasMaxLength(200);
  16. builder.Property(x => x.Amount).IsRequired();
  17. builder.Property(x => x.Reason).HasMaxLength(1000).IsRequired();
  18. builder.Property(x => x.CreatedAt).IsRequired();
  19. }
  20. }