Files
CMS/src/CMSMicroservice.Application/NetworkMembershipCQ/Queries/GetNetworkTree/NetworkTreeDto.cs
T
masoodafar-web 8518c7b3ec
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m9s
feat: Enhance club membership activation and commission pool validation
- 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.
2026-05-01 00:07:05 +03:30

66 lines
2.0 KiB
C#

namespace CMSMicroservice.Application.NetworkMembershipCQ.Queries.GetNetworkTree;
/// <summary>
/// DTO برای نمایش درخت دوتایی شبکه
/// </summary>
public class NetworkTreeDto
{
public long UserId { get; set; }
public string? Mobile { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
/// <summary>
/// کد معرف کاربر
/// </summary>
public string? ReferralCode { get; set; }
public NetworkLeg? LegPosition { get; set; }
public int CurrentDepth { get; set; }
/// <summary>
/// تاریخ فعال‌سازی در باشگاه مشتریان
/// </summary>
public DateTime? ClubActivatedAt { get; set; }
/// <summary>
/// وضعیت فعال بودن در باشگاه مشتریان
/// </summary>
public bool IsClubActive { get; set; }
/// <summary>
/// شماره هفته فعال‌سازی
/// </summary>
public long? ActivationWeekDefinitionId { get; set; }
/// <summary>
/// نام نمایشی هفته فعال‌سازی (مثل: هفته یکم)
/// </summary>
public string? ActivationWeekDisplayName { get; set; }
/// <summary>
/// آیا کاربر در هفته هدف فعال شده است؟
/// </summary>
public bool IsActivatedInTargetWeek { get; set; }
/// <summary>
/// تاریخ ایجاد کاربر
/// </summary>
public DateTimeOffset UserCreated { get; set; }
/// <summary>
/// آیا فعال‌سازی در هفته هدف اولین بار بوده؟ null = بدون Cycle
/// </summary>
public bool? IsNewActivation { get; set; }
/// <summary>
/// نام پکیج موثر (هفته هدف یا پکیج فعلی)
/// </summary>
public string? PackageName { get; set; }
public long? PackageId { get; set; }
public NetworkTreeDto? LeftChild { get; set; }
public NetworkTreeDto? RightChild { get; set; }
}