mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 22:51:30 -07:00
Currency, storefronts, purchasing (#12)
And a few other minor things, but primarily, the balance table exists and also consumable/inventory table.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- Received gift boxes, owned by the `econ` worker. One row per box: a box is created
|
||||
-- when a player buys a storefront item (`/api/storefronts/v2/buyItem`) and deleted when
|
||||
-- the client opens it (`/api/avatar/v2/gifts/consume`, on the `api` worker). Opening is
|
||||
-- cosmetic — the item is granted into the `inventory` table at purchase time, so a box
|
||||
-- carries only its rendered content (`data`) for the gift list. Kept in sync with
|
||||
-- RECEIVED_GIFT_SCHEMA_DDL in @repo/domain's gifts-db.ts.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS received_gift (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
account_id INTEGER NOT NULL,
|
||||
data TEXT NOT NULL,
|
||||
created_at TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_received_gift_account ON received_gift (account_id);
|
||||
Reference in New Issue
Block a user