Welcome credits (spec 8b earned pool v1) + official rehearsal rate card
Every account gets welcomeCredits (25, rate-card configurable) via an idempotent lazy grant on dashboard load, so existing members receive theirs retroactively. earned_credits table with JSON fallback; Overview stat shows the purchased/welcome split. Chatbot facts and canned answers synced; homepage free-membership list mentions the welcome batch. Rate card promoted from placeholder to decided and persisted in the volume. Spending integration for the earned pool is the next engine build. Assets v=20260905b. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,6 +64,12 @@ async function bootstrap() {
|
||||
created BIGINT NOT NULL,
|
||||
INDEX (owner_email), INDEX (type, status), INDEX (member_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`);
|
||||
await q(`CREATE TABLE IF NOT EXISTS earned_credits (
|
||||
email VARCHAR(190) PRIMARY KEY,
|
||||
balance INT NOT NULL DEFAULT 0,
|
||||
granted_welcome TINYINT NOT NULL DEFAULT 0,
|
||||
updated BIGINT NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`);
|
||||
await q(`CREATE TABLE IF NOT EXISTS burns (
|
||||
id VARCHAR(32) PRIMARY KEY,
|
||||
member_id INT NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user