Skip to content

public.staff

Description

Labels

svc-portal

Columns

NameTypeDefaultNullableChildrenParentsComment
idintegernextval('staff_id_seq'::regclass)falseStaff unique identifier.
store_idintegerfalsepublic.storesParent store ID.
staff_codevarchar(50)falseStaff code (unique within store).
staff_namevarchar(255)falseStaff display name.
rolevarchar(50)trueStaff role (e.g., cashier, manager).
is_activebooleantrueStaff active status.
created_attimestamp with time zonetrueRecord creation timestamp.
updated_attimestamp with time zonetrueRecord last update timestamp.

Viewpoints

NameDefinition
Merchant HierarchyMulti-tenant hierarchy — PSP → Merchant → Store → Staff/Devices

Constraints

NameTypeDefinition
staff_store_id_fkeyFOREIGN KEYFOREIGN KEY (store_id) REFERENCES stores(id) ON DELETE RESTRICT
staff_pkeyPRIMARY KEYPRIMARY KEY (id)
uq_staff_store_staff_codeUNIQUEUNIQUE (store_id, staff_code)

Indexes

NameDefinition
staff_pkeyCREATE UNIQUE INDEX staff_pkey ON public.staff USING btree (id)
uq_staff_store_staff_codeCREATE UNIQUE INDEX uq_staff_store_staff_code ON public.staff USING btree (store_id, staff_code)
ix_staff_store_idCREATE INDEX ix_staff_store_id ON public.staff USING btree (store_id)

Relations


Generated by tbls

MPAC — MP-Solution Advanced Cloud Service