Add gross monthly and yearly plan pricing

This commit is contained in:
Hermes Agent
2026-09-20 16:23:40 +00:00
parent c8c6f9239e
commit d36a72f421
4 changed files with 17 additions and 8 deletions
@@ -0,0 +1,4 @@
-- Add billing period and gross price snapshot to existing instances.
ALTER TABLE instances
ADD COLUMN IF NOT EXISTS billing_period ENUM('monthly', 'yearly') NOT NULL DEFAULT 'monthly' AFTER plan,
ADD COLUMN IF NOT EXISTS price_gross_cents INT UNSIGNED NOT NULL DEFAULT 0 AFTER billing_period;
+2
View File
@@ -72,6 +72,8 @@ CREATE TABLE IF NOT EXISTS instances (
owner_user_id BIGINT UNSIGNED NOT NULL,
name VARCHAR(120) NOT NULL,
plan ENUM('s', 'm', 'l') NOT NULL DEFAULT 's',
billing_period ENUM('monthly', 'yearly') NOT NULL DEFAULT 'monthly',
price_gross_cents INT UNSIGNED NOT NULL DEFAULT 0,
payment_status ENUM('pending', 'paid', 'rejected') NOT NULL DEFAULT 'pending',
payment_method ENUM('paypal', 'bank_transfer', 'manual') NULL,
requested_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,