23 lines
931 B
C#
23 lines
931 B
C#
using Company.Domain.PaymentTransactionAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace CompanyManagment.EFCore.Mapping;
|
|
|
|
public class PaymentTransactionMapping:IEntityTypeConfiguration<PaymentTransaction>
|
|
{
|
|
public void Configure(EntityTypeBuilder<PaymentTransaction> builder)
|
|
{
|
|
builder.ToTable("PaymentTransactions");
|
|
builder.HasKey(pt => pt.id);
|
|
|
|
builder.Property(x => x.TransactionId).HasMaxLength(60);
|
|
builder.Property(x => x.CardNumber).HasMaxLength(25);
|
|
builder.Property(x => x.BankName).HasMaxLength(50);
|
|
builder.Property(x => x.Status).HasConversion<string>().HasMaxLength(35);
|
|
builder.Property(x => x.ContractingPartyName).HasMaxLength(255);
|
|
builder.Property(x => x.CallBackUrl).HasMaxLength(500);
|
|
builder.Property(x => x.Source).HasConversion<string>().HasMaxLength(35);
|
|
|
|
}
|
|
} |