ej_message Table (258)
•
Environment: onsite, online
Some tooltip text!
• 5 minutes to read
• 5 minutes to read
This table contains the messages listed under tickets.
Fields
| Name | Description | Type | Null |
|---|---|---|---|
| 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 |

Indexes
| Fields | Types | Description |
|---|---|---|
| id | PK | Clustered, Unique |
| ticket_id | FK | Index |
| created_by | FK | Index |
| message_id | String(850) | Index |
| customer_id | FK | Index |
| body_attachment | FK | Index |
| html_body_attachment | FK | Index |
| search_title, body, html_body | String(255), Clob, Clob | Full text |
| created_at | DateTime | Index |
Relationships
| Table | Description |
|---|---|
| attachment | This table contains metadata for attachments. The actual attachments are stored directly on disk, with filenames based on the the primary key for this table. |
| ejuser | This table contains entries for the users of the system. |
| inbox | Info and status for safe email import |
| invoice_entry | This table contain all invoices, connected to a message |
| message_customers | This table contains all cutomers who are involved in a message |
| message_header | This table contains small pieces of information which is listed over the body for each message. |
| outbox | Outgoing emails with sending status and other info |
| person | Persons |
| sms | This table will hold outgoing sms messages when transmitted with WebServices |
| ticket | This table contains the tickets (requests) of the system. Its purpose should be evident. |
| ticket_attachment | This table connects an attachment to a message. It references the entry in the attachment table, and the message. |
| ticket_log_action | This table contains actions for the tickets. |
| ticket_log_change | This table contains log entries for the tickets. |
Replication Flags
- None
Security Flags
- Sentry controls access to items in this table using user's Role and data rights matrix on the table's parent.