Skip to content

public.stores

Description

Labels

svc-portal

Columns

NameTypeDefaultNullableChildrenParentsComment
idintegernextval('stores_id_seq'::regclass)falsepublic.devices public.staff public.orders public.bills public.payments public.settlements public.bill_operation_histories public.slipsStore unique identifier.
merchant_idintegerfalsepublic.merchantsParent merchant ID.
store_codevarchar(50)falseStore code (unique within merchant).
store_namevarchar(255)falseStore display name.
addresstexttrueStore physical address.
phonevarchar(20)trueStore contact phone.
payment_configjsontrueStore-level payment config (overrides merchant).
printer_itemsjsontruePrinter configuration (JSON).
is_activebooleantrueStore active status.
created_attimestamp with time zonetrueRecord creation timestamp.
updated_attimestamp with time zonetrueRecord last update timestamp.
mps_idvarchar(20)truePGW-generated store identifier. Returned by PGW after syncing store (create/update). Maps mpac store to PGW store.
receipt_settingvarchar(20)trueReceipt source: merchant or store.
receipt_infojsontrueStore-level receipt information (JSON).
shipping_infojsontrueShipping information (JSON).

Viewpoints

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

Constraints

NameTypeDefinition
stores_merchant_id_fkeyFOREIGN KEYFOREIGN KEY (merchant_id) REFERENCES merchants(id) ON DELETE RESTRICT
stores_pkeyPRIMARY KEYPRIMARY KEY (id)
uq_stores_merchant_store_codeUNIQUEUNIQUE (merchant_id, store_code)

Indexes

NameDefinition
stores_pkeyCREATE UNIQUE INDEX stores_pkey ON public.stores USING btree (id)
uq_stores_merchant_store_codeCREATE UNIQUE INDEX uq_stores_merchant_store_code ON public.stores USING btree (merchant_id, store_code)
ix_stores_merchant_idCREATE INDEX ix_stores_merchant_id ON public.stores USING btree (merchant_id)
ix_stores_mps_idCREATE UNIQUE INDEX ix_stores_mps_id ON public.stores USING btree (mps_id)

Relations


Generated by tbls

MPAC — MP-Solution Advanced Cloud Service