feat: Enhance network membership and withdrawal processing with user tracking and logging

This commit is contained in:
masoodafar-web
2025-12-01 20:52:18 +03:30
parent 4aaf2247ff
commit 25fc73ae28
47 changed files with 9545 additions and 284 deletions
@@ -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);
}
}