Files
Backend-Api/CompanyManagment.EFCore/Mapping/PaymentTransactionMapping.cs
2025-07-08 16:50:09 +03:30

24 lines
987 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.AccountNumber).HasMaxLength(25);
builder.Property(x => x.BankName).HasMaxLength(50);
builder.Property(x => x.BankAccountHolderName).HasMaxLength(255);
builder.Property(x => x.Status).HasConversion<string>().HasMaxLength(35);
builder.Property(x => x.ShebaNumber).HasMaxLength(30);
builder.Property(x => x.ContractingPartyName).HasMaxLength(255);
}
}