feat: Enhance network membership and withdrawal processing with user tracking and logging
This commit is contained in:
+3
@@ -27,6 +27,9 @@ public class UserCommissionPayoutConfiguration : IEntityTypeConfiguration<UserCo
|
||||
builder.Property(entity => entity.WithdrawalMethod).IsRequired(false);
|
||||
builder.Property(entity => entity.IbanNumber).IsRequired(false).HasMaxLength(26);
|
||||
builder.Property(entity => entity.WithdrawnAt).IsRequired(false);
|
||||
builder.Property(entity => entity.ProcessedBy).IsRequired(false).HasMaxLength(200);
|
||||
builder.Property(entity => entity.ProcessedAt).IsRequired(false);
|
||||
builder.Property(entity => entity.RejectionReason).IsRequired(false).HasMaxLength(500);
|
||||
|
||||
// رابطه با User
|
||||
builder.HasOne(entity => entity.User)
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
using CMSMicroservice.Domain.Entities.Commission;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
|
||||
public class WorkerExecutionLogConfiguration : IEntityTypeConfiguration<WorkerExecutionLog>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<WorkerExecutionLog> builder)
|
||||
{
|
||||
builder.ToTable("WorkerExecutionLogs", "CMS");
|
||||
|
||||
builder.HasKey(x => x.Id);
|
||||
|
||||
builder.Property(x => x.ExecutionId)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(x => x.WeekNumber)
|
||||
.HasMaxLength(10)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(x => x.StartedAt)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(x => x.Status)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(x => x.ErrorMessage)
|
||||
.HasMaxLength(2000);
|
||||
|
||||
builder.Property(x => x.Details)
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
// Index for querying by week
|
||||
builder.HasIndex(x => x.WeekNumber);
|
||||
|
||||
// Index for querying by execution time
|
||||
builder.HasIndex(x => x.StartedAt);
|
||||
|
||||
// Index for querying by status
|
||||
builder.HasIndex(x => x.Status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user