Featured Products¶
Table: public.featured_products
Columns¶
| Column | Type | Default | Description |
|---|---|---|---|
id |
uuid |
PK | UUID |
product_id |
uuid |
FK → products(id) |
Featured product |
seller_id |
uuid |
FK → sellers(id) |
Owner |
start_date |
timestamptz |
NOT NULL | Feature start |
end_date |
timestamptz |
NOT NULL | Feature end |
fee_paid |
numeric |
0 |
Amount paid |
payment_status |
text |
'pending' |
pending, completed, failed |
is_active |
boolean |
true |
Active toggle |
position |
int |
0 |
Sort position |
created_at |
timestamptz |
now() |
Indexes¶
idx_featured_products_activeon(is_active, start_date, end_date)idx_featured_products_selleronseller_id
Business Logic¶
- Products with an active
featured_productsentry appear in the home screen featured carousel - Position determined by
positioncolumn (lower = higher) - Admin can toggle
is_activeto override - Seller must have an active subscription with available featured slots
Related¶
- Admin: Featured Products — Admin approval
- Seller: Featured Products — Seller purchase
- Mobile: Subscribe — Payment flow