Contacts
Optional per-herd contact list
| Column Name | Data Type | Constraints |
|---|---|---|
| id | bigint | NOT NULL |
| herd_id | bigint | NOT NULL, FK -> herds |
| name | text | NOT NULL |
| phone | text | |
| text | ||
| created_by | uuid | FK -> users |
| created_at | timestamp with time zone | DEFAULT now() NOT NULL |
| updated_by | uuid | FK -> users |
| updated_at | timestamp with time zone | DEFAULT now() NOT NULL |
| 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 |
Security Policies (RLS)
RLS enabled. Herd scope: Herd from contacts.herd_id.
| Operation | has_herd_ability ability key | Other paths |
|---|---|---|
| SELECT | contacts.read | — |
| INSERT | contacts.write | — |
| UPDATE | contacts.write | — |
| DELETE | contacts.write | — |
Platform superadmin: FOR ALL bypass where defined.