Database Schema Reference
All models inherit from a shared Base with:
id — UUID primary key (auto-generated)
created_at — UTC timestamp (auto-set)
updated_at — UTC timestamp (auto-updated)
Owner
Single row — the instance owner's profile.
| Column | Type | Default | Description |
|---|
display_name | String(255) | | Display name |
slug | String(63) | | URL-safe username |
email | String(255) | | Contact email |
avatar_url | String(2048) | | Profile image URL |
bio | Text | | Short biography |
tagline | String(500) | | One-line tagline |
social_links | Text (JSON) | "[]" | [{"platform": "twitter", "url": "..."}] |
theme_config | Text (JSON) | "{}" | Theme customization |
BotConfig
Single row — chatbot settings.
| Column | Type | Default | Description |
|---|
system_prompt | Text | | Custom personality instructions |
greeting_message | Text | "Hello! How can I help?" | Initial message |
model_provider | String(50) | "anthropic" | LLM provider |
model_name | String(100) | "claude-sonnet-4-20250514" | Model identifier |
temperature | Float | 0.7 | Sampling temperature |
enabled_tools | Text (JSON) | '["links","faq"]' | Active tool list |
quick_actions | Text (JSON) | "[]" | Greeting quick-action buttons |
ChatSession
| Column | Type | Description |
|---|
visitor_id | String(36) | Anonymous visitor identifier |
is_active | Bool | Whether session is active |
Message
| Column | Type | Description |
|---|
session_id | FK → ChatSession | Parent session |
role | String(20) | user, assistant, system |
content_text | Text | Plain text content |
content_a2ui | Text (JSON) | A2UI surface snapshot |
token_usage | Integer | Tokens consumed |
Link
| Column | Type | Default | Description |
|---|
title | String(255) | | Link title |
url | String(2048) | | Target URL |
icon | String(50) | | Material icon name |
description | String(500) | | Short description |
sort_order | Integer | 0 | Display order |
is_active | Bool | True | Visibility toggle |
click_count | Integer | 0 | Analytics counter |
Product
| Column | Type | Default | Description |
|---|
title | String(255) | | Product name |
description | Text | | Long description |
price_cents | Integer | 0 | Price in cents |
currency | String(3) | "USD" | Currency code |
product_type | String(20) | "digital" | course, book, digital |
external_url | String(2048) | | Purchase URL |
image_url | String(2048) | | Product image |
is_active | Bool | True | Visibility toggle |
Event
| Column | Type | Description |
|---|
title | String(255) | Event name |
description | Text | Event details |
start_time | DateTime | Start (UTC) |
end_time | DateTime | End (UTC) |
timezone | String(50) | IANA timezone |
max_attendees | Integer | Capacity (0 = unlimited) |
google_calendar_event_id | String(255) | Google Calendar ID |
google_meet_link | String(2048) | Meet URL |
is_active | Bool | Visibility toggle |
RSVP
| Column | Type | Description |
|---|
event_id | FK → Event | Parent event |
name | String(255) | Attendee name |
email | String(255) | Attendee email |
status | String(20) | confirmed, cancelled |
calendar_invite_sent | Bool | Whether invite was sent |
BookingSlot
| Column | Type | Default | Description |
|---|
day_of_week | Integer | | 0=Mon, 6=Sun |
start_time | Time | | Slot start |
end_time | Time | | Slot end |
duration_minutes | Integer | 30 | Meeting duration |
is_active | Bool | True | Availability toggle |
Booking
| Column | Type | Description |
|---|
slot_id | FK → BookingSlot | Parent slot |
date | Date | Booking date |
visitor_name | String(255) | Booker name |
visitor_email | String(255) | Booker email |
status | String(20) | confirmed, cancelled |
google_calendar_event_id | String(255) | Calendar event ID |
google_meet_link | String(2048) | Meet URL |
notes | Text | Additional notes |
Subscriber
| Column | Type | Description |
|---|
email | String(255) | Unique subscriber email |
name | String(255) | Optional name |
subscribed_at | DateTime | Subscription timestamp |
is_active | Bool | Active subscription |
FAQEntry
| Column | Type | Default | Description |
|---|
question | String(500) | | Question text |
answer | Text | | Answer text |
category | String(100) | | Optional category |
sort_order | Integer | 0 | Display order |
is_active | Bool | True | Visibility toggle |
PortfolioItem
| Column | Type | Default | Description |
|---|
title | String(255) | | Project name |
description | Text | | Project description |
image_url | String(2048) | | Project image |
link_url | String(2048) | | Project URL |
category | String(100) | | Category tag |
sort_order | Integer | 0 | Display order |
is_active | Bool | True | Visibility toggle |
Integration
| Column | Type | Description |
|---|
provider | String(50) | google, gumroad, leanpub |
credentials_encrypted | Text | Fernet-encrypted credentials |
scopes | Text (JSON) | ["calendar", "drive"] |
is_active | Bool | Active toggle |