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
@@ -34,5 +34,6 @@ public interface IApplicationDbContext
DbSet<WeeklyCommissionPool> WeeklyCommissionPools { get; }
DbSet<UserCommissionPayout> UserCommissionPayouts { get; }
DbSet<CommissionPayoutHistory> CommissionPayoutHistories { get; }
DbSet<WorkerExecutionLog> WorkerExecutionLogs { get; }
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
@@ -1,6 +1,27 @@
namespace CMSMicroservice.Application.Common.Interfaces;
/// <summary>
/// سرویس دریافت اطلاعات کاربر فعلی از Authentication Context
/// </summary>
public interface ICurrentUserService
{
/// <summary>
/// شناسه کاربر فعلی (از JWT Claims)
/// </summary>
string? UserId { get; }
/// <summary>
/// نام کاربری (Username یا Email)
/// </summary>
string? Username { get; }
/// <summary>
/// آیا کاربر Authenticated است؟
/// </summary>
bool IsAuthenticated { get; }
/// <summary>
/// دریافت string برای PerformedBy (UserId:Username یا "System")
/// </summary>
string GetPerformedBy();
}