Categories & Brands¶
Categories¶
Table: public.categories
| Column | Type | Default | Description |
|---|---|---|---|
id |
uuid |
PK | UUID |
name |
text |
NOT NULL | Category name |
description |
text |
nullable | |
image |
text |
nullable | Icon URL |
parent_id |
uuid |
FK → categories(id) |
Parent (for nesting) |
sort_order |
integer |
0 |
Display order |
status |
text |
'active' |
active, inactive |
created_at |
timestamptz |
now() |
|
updated_at |
timestamptz |
now() |
Supports infinite nesting via parent_id self-reference.
Brands¶
Table: public.brands
| Column | Type | Default | Description |
|---|---|---|---|
id |
uuid |
PK | UUID |
name |
text |
NOT NULL | Brand name |
slug |
text |
NOT NULL | URL-friendly |
logo |
text |
nullable | Logo URL |
description |
text |
nullable | |
is_active |
boolean |
true |
|
created_at |
timestamptz |
now() |
|
updated_at |
timestamptz |
now() |
Indexes¶
idx_categories_parent_idoncategories(parent_id)- Unique on
brands(slug)
Related¶
- Products — Products reference categories and brands