User / Account
An organization — Operator or Property — has many users.
| Field | Type | Notes |
|---|---|---|
| id | uuid | Primary key |
| org_id | uuid | Owning organization |
| role | enum | operator · property · admin_reviewer · admin_compliance · superadmin. Admin is subdivided from the start — cheap now, painful to retrofit |
| citext | Unique login identity | |
| status | enum | invited · active · suspended |
| kyb_status | enum | pending · submitted · verified · rejected. Held at organization level |
| created_at | timestamptz | Server time |
Operations
- post/auth/*PublicSign up, sign in, reset password, refresh session
- get/orgOperatorPropertyRead own organization profile
- put/orgOperatorPropertyUpdate own organization profile
- post/org/kyb-docsOperatorPropertyUpload verification documents; retention policy applies
- fnmanageAdminUsers()SuperadminCreate, suspend and assign roles to admin users