feat: Enhance network membership and withdrawal processing with user tracking and logging
This commit is contained in:
+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