model cluster_g0 Catalogue cluster_g1 Customers cluster_g2 Orders cluster_g3 Fulfilment t_categories categories PK id uuid name text t_products products PK sku text title text FK category_id uuid cents integer active boolean attributes ? jsonb t_categories:e->t_products:w t_stock stock PK,FK sku text quantity integer counted_at ? timestamptz t_products:e->t_stock:w t_order_items order_items PK,FK order_id uuid PK,FK sku text quantity integer unit_cents integer t_products:e->t_order_items:w o_list_products list_products t_customers customers PK id uuid email text name text marketing_opt_in boolean created_at timestamptz legacy_id ? text t_addresses addresses PK id uuid FK customer_id uuid line1 text city text postcode text country text kind ? text t_customers:e->t_addresses:w t_orders orders PK id uuid FK customer_id uuid FK shipping_address_id uuid status text placed_at timestamptz total_cents ? integer coupon_code ? text legacy_ref ? text t_customers:e->t_orders:w t_addresses:e->t_orders:w o_register_customer register_customer t_orders:e->t_order_items:w t_payments payments PK id uuid FK order_id uuid provider text provider_ref text amount_cents integer captured_at timestamptz raw_response ? jsonb t_orders:e->t_payments:w t_shipments shipments PK id uuid FK order_id uuid carrier text tracking_no text shipped_at timestamptz label_url ? text t_orders:e->t_shipments:w s1 Card processor t_orders->s1 authorize s4 Data warehouse t_orders->s4 nightly export o_place_order place_order o_list_orders list_orders o_cancel_order cancel_order s2 Carrier t_payments->s2 book shipment o_capture_payment capture_payment o_ship_order ship_order s0 Web shop s0->t_orders place order s1->t_payments charge settled s3 Warehouse system s3->t_categories stock counts