One mailbox's copy of a message — the row the mailbox UI actually lists.
Every folder view is a query over this table (mailbox_uuid + folder,
ordered by inserted_at), which is why the migration puts a compound index
there. All per-recipient state lives here rather than on the message:
folder— which of the six fixed folders the copy sits inrole—"from"for the sender's own copy,"to"/"cc"/"bcc"for recipients. Drives the recipient chips in the reading pane.seen_at— nil means unseen (the bold rows and the "Unseen" filter)starred— the star toggle in the liststatus—"deleted"is the hard-delete tombstone; ordinary deleting moves the row to the"trash"folder instead
Folders
Fixed set, matching the reference webmail: inbox, sent, drafts, spam, trash,
archive. Deliberately a column and not a table for 0.1.0 — user-defined
folders/labels would be a phoenix_kit_inbox_labels table plus a join, and
that is a v2 migration, not a v1 guess.
Tables are created by PhoenixKitInbox.Migrations, never by this schema.
Summary
Functions
The six fixed folders, in sidebar order.
Valid recipient roles.
Valid values for the status column.