- Create CreatePlanModal component with Headless UI Dialog - Implement dark mode support throughout plans UI - Update plans/page.tsx with professional card layout - Update plans/[id]/page.tsx with consistent styling - Add proper spacing, typography, and color consistency - Implement smooth animations and transitions - Add success/error message feedback - Improve form UX with better input styling
26 lines
919 B
SQL
26 lines
919 B
SQL
-- Create plans table
|
|
CREATE TABLE IF NOT EXISTS plans (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
name VARCHAR(255) NOT NULL,
|
|
slug VARCHAR(100) NOT NULL UNIQUE,
|
|
description TEXT,
|
|
min_users INTEGER NOT NULL DEFAULT 1,
|
|
max_users INTEGER NOT NULL DEFAULT 30, -- -1 means unlimited
|
|
monthly_price NUMERIC(10, 2),
|
|
annual_price NUMERIC(10, 2),
|
|
features TEXT[] NOT NULL DEFAULT '{}',
|
|
differentiators TEXT[] NOT NULL DEFAULT '{}',
|
|
storage_gb INTEGER NOT NULL DEFAULT 1,
|
|
is_active BOOLEAN NOT NULL DEFAULT true,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
-- Add indexes
|
|
CREATE INDEX idx_plans_slug ON plans(slug);
|
|
CREATE INDEX idx_plans_is_active ON plans(is_active);
|
|
|
|
-- Add comments
|
|
COMMENT ON TABLE plans IS 'Subscription plans for agencies';
|
|
COMMENT ON COLUMN plans.max_users IS '-1 means unlimited users';
|