Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | INT | 10 | √ | null |
|
|
|||||
| thread_id | INT | 10 | null |
|
|
||||||
| sender_id | INT | 10 | null |
|
|
||||||
| receiver_id | INT | 10 | null |
|
|
||||||
| message | TEXT | 65535 | null |
|
|
||||||
| is_read | BIT | 1 | 0 |
|
|
||||||
| sent_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
||||||
| created_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
||||||
| updated_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
||||||
| receiver_type | enum('USER', 'SHOP') | 4 | null |
|
|
||||||
| sender_type | enum('USER', 'SHOP') | 4 | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| idx_messages_receiver_id | Performance | Asc | receiver_id |
| idx_messages_sender_id | Performance | Asc | sender_id |
| idx_messages_thread_id | Performance | Asc | thread_id |

