Table "commerce.shops" Column | Type | Collation | Nullable | Default ------------------------+--------------------------+-----------+----------+-------------------------------------- id | uuid | | not null | gen_random_uuid() tenant_id | uuid | | not null | code | character varying(50) | | not null | name | character varying(255) | | not null | address | text | | | phone | character varying(50) | | | timezone | character varying(64) | | not null | 'Asia/Phnom_Penh'::character varying is_active | boolean | | not null | true created_at | timestamp with time zone | | not null | CURRENT_TIMESTAMP updated_at | timestamp with time zone | | not null | CURRENT_TIMESTAMP kitchen_display_secret | character varying(64) | | | Indexes: "shops_pkey" PRIMARY KEY, btree (id) "shops_tenant_id_code_unique" UNIQUE CONSTRAINT, btree (tenant_id, code) "shops_tenant_id_index" btree (tenant_id) Foreign-key constraints: "shops_tenant_id_foreign" FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE Referenced by: TABLE "cafe.kitchen_orders" CONSTRAINT "kitchen_orders_shop_id_foreign" FOREIGN KEY (shop_id) REFERENCES commerce.shops(id) ON DELETE CASCADE TABLE "commerce.pin_identities" CONSTRAINT "pin_identities_shop_id_foreign" FOREIGN KEY (shop_id) REFERENCES commerce.shops(id) ON DELETE CASCADE TABLE "cafe.sessions" CONSTRAINT "sessions_shop_id_foreign" FOREIGN KEY (shop_id) REFERENCES commerce.shops(id) ON DELETE CASCADE TABLE "cafe.shop_pos_configs" CONSTRAINT "shop_pos_configs_shop_id_foreign" FOREIGN KEY (shop_id) REFERENCES commerce.shops(id) ON DELETE CASCADE TABLE "commerce.user_shop_access" CONSTRAINT "user_shop_access_shop_id_foreign" FOREIGN KEY (shop_id) REFERENCES commerce.shops(id) ON DELETE CASCADE