public.stores
Description
Labels
svc-portal
Columns
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | integer | nextval('stores_id_seq'::regclass) | false | public.devices public.staff public.orders public.bills public.payments public.settlements public.bill_operation_histories public.slips | ||
| merchant_id | integer | false | public.merchants | |||
| store_code | varchar(50) | false | ||||
| store_name | varchar(255) | false | ||||
| address | text | true | ||||
| phone | varchar(20) | true | ||||
| payment_config | json | true | ||||
| printer_items | json | true | ||||
| is_active | boolean | true | ||||
| created_at | timestamp with time zone | true | ||||
| updated_at | timestamp with time zone | true | ||||
| mps_id | varchar(20) | true | ||||
| receipt_setting | varchar(20) | true | ||||
| receipt_info | json | true | ||||
| shipping_info | json | true |
Viewpoints
| Name | Definition |
|---|---|
| Merchant Hierarchy | Multi-tenant hierarchy — PSP → Merchant → Store → Staff/Devices |
Constraints
| Name | Type | Definition |
|---|---|---|
| stores_merchant_id_fkey | FOREIGN KEY | FOREIGN KEY (merchant_id) REFERENCES merchants(id) ON DELETE RESTRICT |
| stores_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| uq_stores_merchant_store_code | UNIQUE | UNIQUE (merchant_id, store_code) |
Indexes
| Name | Definition |
|---|---|
| stores_pkey | CREATE UNIQUE INDEX stores_pkey ON public.stores USING btree (id) |
| uq_stores_merchant_store_code | CREATE UNIQUE INDEX uq_stores_merchant_store_code ON public.stores USING btree (merchant_id, store_code) |
| ix_stores_merchant_id | CREATE INDEX ix_stores_merchant_id ON public.stores USING btree (merchant_id) |
| ix_stores_mps_id | CREATE UNIQUE INDEX ix_stores_mps_id ON public.stores USING btree (mps_id) |
Relations
Generated by tbls