Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | INT | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| name | VARCHAR | 255 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| description | TEXT | 65535 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| price | DECIMAL | 12,2 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| status | enum('ACTIVE', 'INACTIVE', 'OUT_OF_STOCK') | 12 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| is_public | BIT | 1 | 1 |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| category_id | INT | 10 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| shop_id | INT | 10 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| created_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| updated_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| deleted_at | DATETIME | 19 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| idx_products_category_id | Performance | Asc | category_id |
| idx_products_name | Performance | Asc | name |
| idx_products_shop_id | Performance | Asc | shop_id |
| idx_products_status | Performance | Asc | status |

