﻿# `commercial_plans`

**Module:** System Configuration

---

## Purpose

Defines subscription tiers (Starter, Professional, Enterprise) and their limits. Seeded at deployment.

---

## Columns (Summary)

| Column | Notes |
|--------|-------|
| `id TINYINT UNSIGNED AUTO_INCREMENT PK` | — |
| `name VARCHAR(50) NOT NULL` | — |
| `slug VARCHAR(50) NOT NULL` | — |
| `default_retention_days SMALLINT UNSIGNED DEFAULT 180` | — |
| `default_archive_days SMALLINT UNSIGNED DEFAULT 365` | — |
| `max_crew_accounts TINYINT UNSIGNED DEFAULT 5` | — |
| `max_guests SMALLINT UNSIGNED DEFAULT 1000` | — |
| `max_gallery_images TINYINT UNSIGNED DEFAULT 20` | — |
| `is_active TINYINT(1) DEFAULT 1` | — |
| `created_at DATETIME DEFAULT CURRENT_TIMESTAMP` | — |
| `deprecated_at DATETIME NULL` | — |

---

## Referenced By

workspaces(commercial_plan_id)

---

## Notes

See `docs/database/RELATIONSHIP.md` for full entity relationships and `database/schema.sql` for authoritative DDL.
