org.locations
Used as PO ship-to, WO work site, SO fulfillment location, and inventory stock bin.
Columns
| Column | Type | Notes |
|---|---|---|
id | UUID PK | |
org_id | UUID FK | → platform.organizations(id). |
name | VARCHAR(100) | UNIQUE per (org_id, name). |
sort_order | SMALLINT | CHECK >= 0. UNIQUE per (org_id, sort_order) — DEFERRABLE INITIALLY IMMEDIATE for reorders. |
address | TEXT | |
city | VARCHAR(150) | |
state | VARCHAR(100) | |
country | CHAR(2) | ISO 3166-1 alpha-2. |
zip_code | VARCHAR(20) | |
notes | TEXT | |
is_active | BOOL | NOT NULL. Default true. |
created_at | TIMESTAMPTZ | NOT NULL. Default NOW(). |
updated_at | TIMESTAMPTZ | NOT NULL. Default NOW(). Auto-updated by trigger. |
Cross-references
- Referenced by purchase orders, work orders, sales orders, and both inventory ledgers.
- Linked to contacts via
entity_contacts.entity_type = 'location'for emails / phones.