Paradaux
IssuesPAR-175Planned
0

[Epic] In-game firm sales commands (/firm sales …) over Treasury chestshop_sale — replace PlayerBusinesses sales feature

Goal

Reproduce — and improve on — the legacy PlayerBusinesses (playerbusinesses-dbrecode) in-game sales command family, reading Treasury's authoritative chestshop_sale table instead of the legacy plugin's thin SaleEntry store. business-rian has no sales commands today.

What the legacy plugin does (parity target)

  • /pb sales <firm> [page] (playerbusinesses.sales.use) — paginated in-game sales list: %time% %player% sold/bought %amount%x %item% for %price% at %firm%; marks entries "viewed" (strikethrough once seen). Owner/staff/admin only.
  • /pb sales toggle <firm> (playerbusinesses.sales.toggle) — toggle real-time sale notifications to firm staff (chestshop-(buy|sale)-notify); persisted as transactions_toggled_sales. Owner only.
  • /pb sales export <firm> <days> (playerbusinesses.sales.export) — export N days of sales to a Hastebin URL; cap max-sales-export-days: 30; sales-expire: 60 prunes old rows.

Legacy SaleEntry stores only: material string, price, amount, bought/sold flag, viewed flag, time, player name.

Why "better" is mostly already in the data

Treasury's chestshop_sale (V6) already captures everything legacy did plus: direction (BUY/SELL), customer_uuid, unit_price + total_price, tax_amount, custom-item-aware item_key/item_name/item_data, world+sign_x/y/z, post-trade shop_stock, and a ledger txn_id link. It's indexed by firm/owner/time/item/customer. So the new commands surface richer rows, real aggregates, and proper custom items — no new capture work, just a read path + commands.

Sub-issues

  • PAR-176 — Sales-query read API over chestshop_sale (Treasury API) — the enabler
  • PAR-177/firm sales <firm> [page] — paginated list (Business)
  • PAR-178/firm sales summary <firm> [days] — aggregate report, new (Business)
  • PAR-179/firm sales toggle <firm> + real-time notifications on PAR-94 (Business)
  • PAR-180/firm sales export <firm> <days> — explorer deep link / signed CSV, not Hastebin (Business)
  • PAR-181 — personal /sales for a player's own chestshops — scope extension, optional (Treasury)

Build order

  1. PAR-176 read API first (everything depends on it).
  2. PAR-177 list + PAR-178 summary (the core value).
  3. PAR-179 notifications (on the done FirmNotificationService, PAR-94) + PAR-180 export.
  4. PAR-181 personal sales last.

Data substrate shared with PAR-166 (chestshop market spin-out) / PAR-116 (public market REST). Notifications build on PAR-94 (done).

Comments

No comments yet.

Activity

  • tesks changed status to Status → PlannedJun 15, 2026, 12:33 AM
  • tesks description: Description updatedJun 14, 2026, 11:49 PM
  • tesks created the issueJun 14, 2026, 11:48 PM