using Company.Domain.FinancialTransactionAgg; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace CompanyManagment.EFCore.Mapping; public class FinancialTransactionMapping : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("FinancialTransactions"); builder.HasKey(x => x.id); builder.Property(x => x.TdateFa); builder.Property(x => x.TdateFa).HasMaxLength(10); builder.Property(x => x.TypeOfTransaction).HasMaxLength(10); builder.Property(x => x.DescriptionOption).HasMaxLength(100); builder.Property(x => x.Description).HasMaxLength(600); builder.Property(x => x.Deptor); builder.Property(x => x.Creditor); builder.Property(x => x.TdateFa); builder.Property(x => x.Balance); builder.Property(x => x.SentSms); builder.Property(x => x.MessageText).HasMaxLength(255); builder.Property(x => x.SentSmsDateFa).HasMaxLength(10); builder.HasOne(x => x.FinancialStatment) .WithMany(x => x.FinancialTransactionList) .HasForeignKey(x => x.FinancialStatementId); } }