Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | INT | 10 | √ | null |
|
|
|||||
| user_id | INT | 10 | null |
|
|
||||||
| target_type | enum('PRODUCT', 'SHOP', 'STAFF') | 7 | null |
|
|
||||||
| target_id | INT | 10 | null |
|
|
||||||
| created_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
||||||
| updated_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| idx_favorites_user_id | Performance | Asc | user_id |
| uniq_user_target_type | Must be unique | Asc/Asc/Asc | user_id + target_id + target_type |

