Skip to main content

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.

ColumnTypeDefaultDescription
display_nameString(255)Display name
slugString(63)URL-safe username
emailString(255)Contact email
avatar_urlString(2048)Profile image URL
bioTextShort biography
taglineString(500)One-line tagline
social_linksText (JSON)"[]"[{"platform": "twitter", "url": "..."}]
theme_configText (JSON)"{}"Theme customization

BotConfig

Single row — chatbot settings.

ColumnTypeDefaultDescription
system_promptTextCustom personality instructions
greeting_messageText"Hello! How can I help?"Initial message
model_providerString(50)"anthropic"LLM provider
model_nameString(100)"claude-sonnet-4-20250514"Model identifier
temperatureFloat0.7Sampling temperature
enabled_toolsText (JSON)'["links","faq"]'Active tool list
quick_actionsText (JSON)"[]"Greeting quick-action buttons

ChatSession

ColumnTypeDescription
visitor_idString(36)Anonymous visitor identifier
is_activeBoolWhether session is active

Message

ColumnTypeDescription
session_idFK → ChatSessionParent session
roleString(20)user, assistant, system
content_textTextPlain text content
content_a2uiText (JSON)A2UI surface snapshot
token_usageIntegerTokens consumed
ColumnTypeDefaultDescription
titleString(255)Link title
urlString(2048)Target URL
iconString(50)Material icon name
descriptionString(500)Short description
sort_orderInteger0Display order
is_activeBoolTrueVisibility toggle
click_countInteger0Analytics counter

Product

ColumnTypeDefaultDescription
titleString(255)Product name
descriptionTextLong description
price_centsInteger0Price in cents
currencyString(3)"USD"Currency code
product_typeString(20)"digital"course, book, digital
external_urlString(2048)Purchase URL
image_urlString(2048)Product image
is_activeBoolTrueVisibility toggle

Event

ColumnTypeDescription
titleString(255)Event name
descriptionTextEvent details
start_timeDateTimeStart (UTC)
end_timeDateTimeEnd (UTC)
timezoneString(50)IANA timezone
max_attendeesIntegerCapacity (0 = unlimited)
google_calendar_event_idString(255)Google Calendar ID
google_meet_linkString(2048)Meet URL
is_activeBoolVisibility toggle

RSVP

ColumnTypeDescription
event_idFK → EventParent event
nameString(255)Attendee name
emailString(255)Attendee email
statusString(20)confirmed, cancelled
calendar_invite_sentBoolWhether invite was sent

BookingSlot

ColumnTypeDefaultDescription
day_of_weekInteger0=Mon, 6=Sun
start_timeTimeSlot start
end_timeTimeSlot end
duration_minutesInteger30Meeting duration
is_activeBoolTrueAvailability toggle

Booking

ColumnTypeDescription
slot_idFK → BookingSlotParent slot
dateDateBooking date
visitor_nameString(255)Booker name
visitor_emailString(255)Booker email
statusString(20)confirmed, cancelled
google_calendar_event_idString(255)Calendar event ID
google_meet_linkString(2048)Meet URL
notesTextAdditional notes

Subscriber

ColumnTypeDescription
emailString(255)Unique subscriber email
nameString(255)Optional name
subscribed_atDateTimeSubscription timestamp
is_activeBoolActive subscription

FAQEntry

ColumnTypeDefaultDescription
questionString(500)Question text
answerTextAnswer text
categoryString(100)Optional category
sort_orderInteger0Display order
is_activeBoolTrueVisibility toggle

PortfolioItem

ColumnTypeDefaultDescription
titleString(255)Project name
descriptionTextProject description
image_urlString(2048)Project image
link_urlString(2048)Project URL
categoryString(100)Category tag
sort_orderInteger0Display order
is_activeBoolTrueVisibility toggle

Integration

ColumnTypeDescription
providerString(50)google, gumroad, leanpub
credentials_encryptedTextFernet-encrypted credentials
scopesText (JSON)["calendar", "drive"]
is_activeBoolActive toggle