products table
The products table in the E-commerce Database Schema schema has 8 columns, keyed by id, with 1 foreign key to brands. 5 columns in product_reviews, product_categories, product_options, product_variants and 1 more reference it.
The marketing-level item. Nothing is bought or stocked at this level, only at product_variants.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| brand_id | uuid | references brands.id | |
| title | varchar(255) | not null | |
| slug | varchar(280) | unique, not null | |
| description | text | ||
| status | product_status | not null | |
| published_at | timestamptz | ||
| created_at | timestamptz | not null |
Indexes (1)
(status, published_at)
Relationships
products.brand_idreferencesbrands.idproduct_reviews.product_idreferencesproductsproduct_categories.product_idreferencesproductsproduct_options.product_idreferencesproductsproduct_variants.product_idreferencesproductsproduct_images.product_idreferencesproducts