| id | The primary key (auto-incremented) | PK | |
| ticket_id | The ticket this message is a child of. | FK ticket | |
| search_title | A copy of the title of the ticket, for search optimisation and simpler reporting. | String(255) | |
| created_at | When the message was posted. | DateTime | ● |
| created_by | The id of the user who posted the message. The value 1 (system user) for externally posted messages. | FK ejuser | |
| type | The type of the message (plaintext/html). | Enum TicketMessageType | ● |
| message_category | Defines what kind of message this is. | Enum TicketMessageCategory | |
| author | A string representing the author of the message. Could be a user's name, or a persons email address. | String(255) | ● |
| slevel | The securitylevel of the message. | Enum TicketSecurityLevel | ● |
| message_id | The Message-Id header value from the email. Used for threading, i.e. connecting messages to existing tickets. | String(850) | |
| time_spent | The time spent (minutes) for this message. | Int | ● |
| time_charge | The amount of time (minutes) which should be invoiced for this message. | Int | ● |
| body | The textbody for the message. | Clob | ● |
| html_body | The html body for the message (if any). | Clob | ● |
| email_header | The email header is saved in this field as raw text | Clob | ● |
| debug_info | The debug info for the message. | Clob | ● |
| mail_sorter | The name of the mail sorter used when the email was imported. Note: We must use name instead of id since the id's change every time one changes the mail sorter. :-0 | String(255) | ● |
| customer_id | If the message was created by email or from the customer center, this field will point to that customer. -1 if the message was created by an user | FK person | |
| body_attachment | If the body is too long for the database, it's stored in this attachment instead. | FK attachment | |
| html_body_attachment | If the htmlbody is too long for the database, it's stored in this attachment instead. | FK attachment | |
| html_body_inline_converted | True if the html_body has converted inline image links. | Bool | |
| inbox | The id of the inbox entry which created this message. Note: inbox entries are regularily deleted. | FK inbox | ● |
| important | If this message is important or not. | Bool | ● |
| language | The language this message is in, based on some kind of analysis | String(10) | ● |
| sentiment | Sentiment index, 100 = completely happy; -100 = suicidally unhappy; 0 = no idea | Int | ● |
| sentimentConfidence | Confidence of sentiment index, 0 = no idea, 100 = completely sure | Int | ● |
| changed_at | When the message was changed. | DateTime | ● |
| changed_by | The id of the user who changed the message. | FK ejuser | ● |
| badge | Badge to explicitly determine how a message was generated | Enum BadgeType | |