Commit Graph

4 Commits

Author SHA1 Message Date
masoodafar-web 1885fcbd3b docs: BIZ-PACKAGE-BASED-SYSTEM v4 — comprehensive side-effect discovery
44 NEW side effects discovered across 6 layers (total: 92 changes):

Side Effects — CMS Domain (3):

Side Effects — CMS Application (10):
- ChargeMagicWalletCommandHandler: global MagicWalletMaxDeposit (1B)
- VerifyMagicWalletChargeCommandHandler: global multiplier ×2.5
- UserOrderService EXIT/ENTRY: global caps → user trapped/ejected wrong
- 3 FluentValidation validators: hardcoded 1B ceiling
- GetAllFeatureIds(): ALL features granted regardless of package
- JWT: no PackageId/CanRepurchase, just boolean HasPurchased
- WalletGrpcService.GetMagicWalletStatus: global caps to frontend
- 4 Notifications: no PackageId in interface

Side Effects — Background (3):
- ClubMembershipCycleSeedService: seeds with hardcoded amounts
- DayaLoanStatusCheckWorker: global DayaLoanAmount
- ChatikaAccountActivationWorker: no package filter

Side Effects — FrontOffice (9):
- Contract text '56M toman' = LEGAL LIABILITY
- Magic wallet ×2.5 and deposit cap hardcoded (6 places + C# code)
- 'پکیج طلایی' hardcoded (5+ places) — wrong name
- PackageId=1 hardcoded in activation flow

Side Effects — BackOffice (8):
- ManualActivationDialog: 56M hardcoded + disabled + no package selector
- SystemConfigurationPage: global settings need per-package
- CSV exports (3 places): no package column

Impact: 48 core changes + 44 side effects = 92 total
Timeline: v3 17 days → v4 22 days critical path (+5 days)
2026-02-25 00:27:14 +03:30
masoodafar-web 33d5ae9305 docs: BIZ-PACKAGE-BASED-SYSTEM v3 — per-package commission deep analysis
Major v3 changes:
- Q12-Q18: MaxWeeklyBalancesPerLeg, MaxNetworkLevel, MagicWalletMaxDeposit,
  MagicWalletMaxCredit all become per-package (not global SystemConstants)
- NetworkWeeklyBalance gets PackageId + Unique(UserId,WeekId,PackageId)
- SP changes: @MaxBalancesPerLeg and @MaxNetworkLevel as dynamic params
  (removing hardcoded 300/15)
- SpCommissionCalculationStrategy: pass package settings to SPs
- Carryover per-package: week-shifting only for same PackageId records
- commission.proto: package_id+package_title in 4 message types,
  new CustomerCommissionPackageSummary message, package filter in requests
- FrontOffice: commission dashboard with per-package summary cards
- BackOffice: package filter dropdown in all commission reports + CSV
- Package Create/Edit: Quick Access checkboxes for features inline
- Seed data: silver MaxBalancesPerLeg=30, MagicWalletMax=100M/250M
- Migration: NetworkWeeklyBalances existing records get base PackageId
- Impact Analysis: 39 -> 48+ changes across 6 layers
- Timeline: 14 -> 17 days critical path (+3 days for per-package work)

Updated docs:
- business/BIZ-PACKAGE-BASED-SYSTEM.md (v2 -> v3)
- roadmap/PACKAGE-TRANSFORMATION-TASKS.md (synced with v3)
2026-02-24 23:48:09 +03:30
masoodafar-web dd5a2617cf docs: BIZ-PACKAGE-BASED-SYSTEM v2 — deep analysis + approved decisions
- 6 bugs found (DiscountBalance, UserPackagePurchase, re-purchase blocked)
- 15 hardcodes identified for removal
- 7 guards blocking re-purchase analyzed
- 5 payment path inconsistencies documented
- 39 changes across 6 layers planned
- 5 phases: bugfix → infra → logic → commission → UI → test
- v1 draft preserved as BIZ-PACKAGE-BASED-SYSTEM-v1-draft.md
2026-02-24 21:34:59 +03:30
masoodafar-web c78850f86e docs: update BUSINESS-02, BUSINESS-03, TECH-03
BUSINESS-02:
- فرمول هایبرید: حذف MIN، اضافه validation کیف‌پول اعتباری
- فلوی خرید: اضافه مرحله بررسی موجودی + UserWalletChangeLog
- نام‌گذاری جدید کیف‌پول‌ها: اصلی، اعتباری، پاداش تیمی
- جدول وضعیت: اضافه WalletChangeLog + Validation

BUSINESS-03:
- بخش ۹ جدید: ExpirePendingOrdersService (۱۵ دقیقه)
- دیاگرام Mermaid فلوی انقضا

TECH-03:
- فیکس URL پروداکشن (kbs1→kbs2) + هشدار
- ۴ کامیت جدید در بخش ۹.۲
- بخش ۹.۳ فیکس URL پروداکشن
- بخش ۹.۴ نام‌گذاری کیف‌پول‌ها
2026-02-24 00:29:03 +03:30