Files
CMS/src/CMSMicroservice.Application/NetworkMembershipCQ/Queries/GetNetworkTree/NetworkTreeDto.cs
T
masoodafar-web ea1d2d4400
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 12m47s
feat(network): enrich network tree with package leg scores and update Protobuf definitions
- Added logic to enrich the network tree with the latest left/right leg totals for gold and silver packages in GetNetworkTreeQueryHandler.
- Introduced new properties in NetworkTreeDto for GoldLeftLegTotal, GoldRightLegTotal, SilverLeftLegTotal, and SilverRightLegTotal.
- Updated Protobuf definitions to include new fields for leg scores in NetworkTreeNodeModel.
- Enhanced mapping in NetworkMembershipProfile and NetworkMembershipService to accommodate new leg score properties.
- Bumped Protobuf project version to reflect the addition of new features.
2026-08-25 22:39:19 +03:30

78 lines
2.5 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; }
/// <summary>آخرین LeftLegTotal پکیج طلایی (پایه)</summary>
public int GoldLeftLegTotal { get; set; }
/// <summary>آخرین RightLegTotal پکیج طلایی (پایه)</summary>
public int GoldRightLegTotal { get; set; }
/// <summary>آخرین LeftLegTotal پکیج نقره‌ای</summary>
public int SilverLeftLegTotal { get; set; }
/// <summary>آخرین RightLegTotal پکیج نقره‌ای</summary>
public int SilverRightLegTotal { get; set; }
public NetworkTreeDto? LeftChild { get; set; }
public NetworkTreeDto? RightChild { get; set; }
}