feat(billing): record subscription-covered token usage in usage records (#46)
Memind CI / Test, build, and release guards (push) Successful in 2m52s

This commit was merged in pull request #46.
This commit is contained in:
2026-08-06 10:52:55 +00:00
parent 7c18c998bd
commit 49ff7c9bad
4 changed files with 145 additions and 6 deletions
+1
View File
@@ -511,6 +511,7 @@ CREATE TABLE IF NOT EXISTS h5_usage_records (
output_tokens INT NOT NULL DEFAULT 0,
cost_cents BIGINT NOT NULL,
balance_after_cents BIGINT NOT NULL,
billing_source VARCHAR(16) NOT NULL DEFAULT 'wallet',
created_at BIGINT NOT NULL,
UNIQUE KEY uniq_h5_usage_request_id (request_id),
KEY idx_h5_usage_user_time (user_id, created_at),