-- ============================================ -- TEMPLATE-SAAS: Enum Types -- Version: 1.0.0 -- ============================================ -- Auth enums CREATE TYPE auth.token_type AS ENUM ('access', 'refresh', 'reset_password', 'email_verification', 'api_key'); CREATE TYPE auth.oauth_provider AS ENUM ('google', 'microsoft', 'github', 'apple'); CREATE TYPE auth.session_status AS ENUM ('active', 'expired', 'revoked'); -- Tenant enums CREATE TYPE tenants.tenant_status AS ENUM ('pending', 'active', 'suspended', 'cancelled'); CREATE TYPE tenants.subscription_status AS ENUM ('trialing', 'active', 'past_due', 'cancelled', 'unpaid'); -- User enums CREATE TYPE users.user_status AS ENUM ('pending', 'active', 'suspended', 'deleted'); CREATE TYPE users.invitation_status AS ENUM ('pending', 'accepted', 'expired', 'cancelled'); -- Billing enums CREATE TYPE billing.payment_status AS ENUM ('pending', 'processing', 'succeeded', 'failed', 'refunded', 'cancelled'); CREATE TYPE billing.invoice_status AS ENUM ('draft', 'open', 'paid', 'void', 'uncollectible'); CREATE TYPE billing.billing_interval AS ENUM ('month', 'year'); -- Notification enums CREATE TYPE notifications.channel AS ENUM ('email', 'push', 'in_app', 'sms', 'whatsapp'); CREATE TYPE notifications.notification_status AS ENUM ('pending', 'sent', 'delivered', 'failed', 'read'); CREATE TYPE notifications.priority AS ENUM ('low', 'normal', 'high', 'urgent'); -- Feature flag enums CREATE TYPE feature_flags.flag_status AS ENUM ('disabled', 'enabled', 'percentage', 'user_list'); CREATE TYPE feature_flags.rollout_stage AS ENUM ('development', 'internal', 'beta', 'general'); -- Audit enums CREATE TYPE audit.action_type AS ENUM ('create', 'read', 'update', 'delete', 'login', 'logout', 'export', 'import'); CREATE TYPE audit.severity AS ENUM ('info', 'warning', 'error', 'critical'); -- Storage enums CREATE TYPE storage.file_status AS ENUM ('uploading', 'processing', 'ready', 'failed', 'deleted'); CREATE TYPE storage.visibility AS ENUM ('private', 'tenant', 'public');