﻿# `message_templates`

**Module:** Messaging

---

## Purpose

WhatsApp invitation message templates per workspace. Stores the message body with token placeholders.

---

## Columns (Summary)

| Column | Notes |
|--------|-------|
| `id BIGINT UNSIGNED AUTO_INCREMENT PK` | — |
| `workspace_id BIGINT UNSIGNED NOT NULL FK→workspaces` | — |
| `template_type VARCHAR(20) NOT NULL (invitation|h1_reminder|wedding_day_reminder)` | — |
| `body_text TEXT NOT NULL` | — |
| `is_default TINYINT(1) DEFAULT 1` | — |
| `created_at DATETIME DEFAULT CURRENT_TIMESTAMP` | — |
| `updated_at DATETIME NULL` | — |

---

## Referenced By

communication_logs(template_id)

---

## Notes

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