Products
Higher-level product lines/families; one manufacturer, many product numbers
| Column Name | Data Type | Constraints |
|---|---|---|
| id | bigint | NOT NULL |
| manufacturer_id | bigint | NOT NULL, FK -> manufacturers |
| name | text | NOT NULL, unique per manufacturer (case-insensitive) |
| description | text | |
| website | text | |
| category | text | |
| image_uri | text | bucket-qualified path product_images/{product_id}/{filename} |
| lifecycle | public.entity_lifecycle | DEFAULT 'active' NOT NULL |
| lifecycle_changed_at | timestamp with time zone | DEFAULT timezone('utc'::text, now()) NOT NULL |
| lifecycle_changed_by | uuid | |
| lifecycle_reason | text | |
| inserted_at | timestamp with time zone | DEFAULT timezone('utc'::text, now()) NOT NULL |
Security Policies (RLS)
RLS enabled. Scope: Global, superadmin-managed catalog.
| Operation | has_herd_ability ability key | Other paths |
|---|---|---|
| SELECT | — | has_view_role_any_herd (herds.read in any herd), device API key, or superadmin |
| INSERT | — | Platform superadmin only |
| UPDATE | — | Platform superadmin only |
| DELETE | — | Platform superadmin only |
Platform superadmin: FOR ALL bypass where defined.