public.staff
Description
Labels
svc-portal
Columns
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | integer | nextval('staff_id_seq'::regclass) | false | |||
| store_id | integer | false | public.stores | |||
| staff_code | varchar(50) | false | ||||
| staff_name | varchar(255) | false | ||||
| role | varchar(50) | true | ||||
| is_active | boolean | true | ||||
| created_at | timestamp with time zone | true | ||||
| updated_at | timestamp with time zone | true |
Viewpoints
| Name | Definition |
|---|---|
| Merchant Hierarchy | Multi-tenant hierarchy — PSP → Merchant → Store → Staff/Devices |
Constraints
| Name | Type | Definition |
|---|---|---|
| staff_store_id_fkey | FOREIGN KEY | FOREIGN KEY (store_id) REFERENCES stores(id) ON DELETE RESTRICT |
| staff_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| uq_staff_store_staff_code | UNIQUE | UNIQUE (store_id, staff_code) |
Indexes
| Name | Definition |
|---|---|
| staff_pkey | CREATE UNIQUE INDEX staff_pkey ON public.staff USING btree (id) |
| uq_staff_store_staff_code | CREATE UNIQUE INDEX uq_staff_store_staff_code ON public.staff USING btree (store_id, staff_code) |
| ix_staff_store_id | CREATE INDEX ix_staff_store_id ON public.staff USING btree (store_id) |
Relations
Generated by tbls