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
This commit is contained in:
masoodafar-web
2026-02-26 00:57:20 +03:30
parent 0002a5a6f2
commit 607f791b65
8 changed files with 144 additions and 63 deletions
@@ -153,7 +153,7 @@ message GetUserNetworkResponse
bool has_received_daya_credit = 32;
google.protobuf.Timestamp daya_credit_received_at = 33;
int32 package_purchase_method = 34;
bool has_purchased_golden_package = 35;
bool has_purchased_package = 35;
// آمار مالی
double total_earned_commission = 36;