Files
CMS/src/CMSMicroservice.Application/NetworkMembershipCQ/Queries/GetUserNetworkPosition/UserNetworkPositionDto.cs
T
masoodafar-web 607f791b65 Phase 5: Per-package commission + golden ref cleanup
- Fix golden/طلایی string refs in user-facing messages (ActivateClubMembership)
- Rename HasPurchasedGoldenPackage → HasPurchasedPackage (DTO, Handler, Proto, Mapping)
- ORM commission: per-user-package calculation via ClubMembership.LastPackageId
  - Build userPackageMap, per-user maxBalancesPerLeg/maxNetworkLevel
  - Carryover keyed by (UserId, PackageId) tuple
- SP commission: loop over packages, pass @PackageId/@InputMaxBalancesPerLeg/@InputMaxNetworkLevel
- sp_CalculateWeeklyBalances: accept 3 new params, filter by PackageId, insert PackageId column
2026-02-26 00:57:20 +03:30

67 lines
2.5 KiB
C#

namespace CMSMicroservice.Application.NetworkMembershipCQ.Queries.GetUserNetworkPosition;
/// <summary>
/// DTO برای نمایش موقعیت کاربر در شبکه
/// </summary>
public class UserNetworkPositionDto
{
// اطلاعات اصلی کاربر
public long UserId { get; set; }
public string? Mobile { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? Email { get; set; }
public string? NationalCode { get; set; }
public string ReferralCode { get; set; } = string.Empty;
public bool IsMobileVerified { get; set; }
public DateTime? BirthDate { get; set; }
public DateTime JoinedAt { get; set; }
// اطلاعات شبکه
public long? NetworkParentId { get; set; }
public string? ParentMobile { get; set; }
public string? ParentFullName { get; set; }
public NetworkLeg? LegPosition { get; set; }
public bool IsInNetwork { get; set; }
// آمار فرزندان مستقیم
public int TotalChildren { get; set; }
public int LeftChildCount { get; set; }
public int RightChildCount { get; set; }
// آمار کل زیرمجموعه (تمام سطوح)
public int TotalLeftLegMembers { get; set; }
public int TotalRightLegMembers { get; set; }
public int TotalNetworkSize { get; set; }
// اطلاعات فرزندان مستقیم
public long? LeftChildId { get; set; }
public string? LeftChildFullName { get; set; }
public string? LeftChildMobile { get; set; }
public DateTime? LeftChildJoinedAt { get; set; }
public long? RightChildId { get; set; }
public string? RightChildFullName { get; set; }
public string? RightChildMobile { get; set; }
public DateTime? RightChildJoinedAt { get; set; }
// اطلاعات پکیج و دایا
public bool HasReceivedDayaCredit { get; set; }
public DateTime? DayaCreditReceivedAt { get; set; }
public PackagePurchaseMethod PackagePurchaseMethod { get; set; }
public bool HasPurchasedPackage { get; set; }
// آمار مالی
public decimal TotalEarnedCommission { get; set; }
public decimal TotalPaidCommission { get; set; }
public decimal PendingCommission { get; set; }
public int TotalBalancesEarned { get; set; }
// عمق شبکه
public int MaxNetworkDepth { get; set; }
// آمار فعالیت
public int ActiveMembersInNetwork { get; set; }
public int InactiveMembersInNetwork { get; set; }
}