8518c7b3ec
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m9s
- Updated AcceptClubMembershipContractCommandHandler to set PackagePurchasedAt to the contract-signing time, ensuring accurate pool charging. - Modified ActivateClubMembershipCommand to allow specifying a PackageId for forced activation, defaulting to the base package if not provided. - Improved ActivateClubMembershipCommandHandler to handle new and existing memberships differently regarding pool charging. - Added validation logic in GetWeeklyCommissionPoolQueryHandler to compare TotalPoolAmount against actual activations. - Introduced validation fields in WeeklyCommissionPoolDto for tracking discrepancies and expected amounts. - Updated stored procedures to ensure accurate calculations based on package purchases and to handle empty pools. - Enhanced protobuf definitions to include validation fields for commission pools and network tree nodes. - Added mapping for new fields in CommissionProfile and NetworkMembershipProfile. - Created DiscountProductProfile for mapping discount product requests and responses.
30 lines
1.5 KiB
C#
30 lines
1.5 KiB
C#
namespace CMSMicroservice.Application.CommissionCQ.Queries.GetWeeklyCommissionPool;
|
||
|
||
/// <summary>
|
||
/// DTO برای استخر کمیسیون هفتگی
|
||
/// </summary>
|
||
public class WeeklyCommissionPoolDto
|
||
{
|
||
public long Id { get; set; }
|
||
public long WeekDefinitionId { get; set; }
|
||
public string WeekDisplayName { get; set; } = string.Empty;
|
||
public long TotalPoolAmount { get; set; }
|
||
public long TotalBalances { get; set; }
|
||
public decimal ValuePerBalance { get; set; }
|
||
public bool IsCalculated { get; set; }
|
||
public DateTime? CalculatedAt { get; set; }
|
||
public DateTimeOffset Created { get; set; }
|
||
public long PackageId { get; set; }
|
||
public string PackageTitle { get; set; } = string.Empty;
|
||
|
||
// ── Validation Fields (Q29) ──
|
||
/// <summary>آیا TotalPoolAmount با تعداد فعالسازیهای ثبتشده در دیتابیس مطابقت دارد؟</summary>
|
||
public bool ValidationIsValid { get; set; } = true;
|
||
/// <summary>مبلغ مورد انتظار بر اساس شمارش فعالسازیها × ActivationFee</summary>
|
||
public long ValidationExpectedAmount { get; set; }
|
||
/// <summary>اختلاف: TotalPoolAmount - ValidationExpectedAmount</summary>
|
||
public long ValidationDiscrepancy { get; set; }
|
||
/// <summary>تعداد فعالسازیهای شناساییشده برای این هفته و پکیج</summary>
|
||
public int ValidationActivationCount { get; set; }
|
||
}
|