diagram-contracts 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,19 +10,25 @@ AI can safely describe diagrams, layouts, and relationship structures; the engin
10
10
 
11
11
  ### AWS System Architecture (Draw TSX → SVG)
12
12
 
13
- Generated from `samples/system-architecture.draw.tsx`. A composite layout combining AWS icons, nested VPC, AlignConstraint, and Connectors.
13
+ [![AWS System Architecture](assets/readme/system-architecture.svg)](assets/readme/system-architecture.draw.tsx)
14
14
 
15
- ![AWS System Architecture](samples/system-architecture.svg)
15
+ Source:
16
+
17
+ - [`assets/readme/system-architecture.draw.tsx`](assets/readme/system-architecture.draw.tsx) — entry diagram
18
+ - [`assets/readme/system-parts.draw.tsx`](assets/readme/system-parts.draw.tsx) — VPC and service part components
19
+ - [`assets/readme/components/aws.draw.tsx`](assets/readme/components/aws.draw.tsx) — reusable AWS primitives (`AwsVpc`, `AwsService`, `AwsAccount`, …)
16
20
 
17
21
  ### ER Diagram (Draw TSX → SVG)
18
22
 
19
- ![ER Diagram](samples/showcase-tsx.svg)
23
+ [![ER Diagram](assets/readme/showcase-tsx.svg)](assets/readme/showcase-tsx.draw.tsx)
24
+
25
+ Source: [`assets/readme/showcase-tsx.draw.tsx`](assets/readme/showcase-tsx.draw.tsx)
20
26
 
21
27
  Regenerate:
22
28
 
23
29
  ```bash
24
- diagram-contracts render samples/system-architecture.draw.tsx -o samples/system-architecture.svg
25
- diagram-contracts render samples/showcase-tsx.draw.tsx -o samples/showcase-tsx.svg
30
+ diagram-contracts render assets/readme/system-architecture.draw.tsx -o assets/readme/system-architecture.svg
31
+ diagram-contracts render assets/readme/showcase-tsx.draw.tsx -o assets/readme/showcase-tsx.svg
26
32
  ```
27
33
 
28
34
  ## Input Formats
@@ -77,6 +83,46 @@ export function AwsVpc({ label, children }: { label: string }) {
77
83
  }
78
84
  ```
79
85
 
86
+ Component and built-in resolution follows the React convention: **a defined or imported component takes precedence over a built-in element of the same name.** Naming a component `Cell`, `Divider`, `Row`, etc. therefore uses your component (not the built-in), and the compiler emits a one-time **warning** noting the shadow so the precedence is never silent. Rename the component to reach the built-in element. Imported components are in scope both at the document tree and inside other component bodies (including transitively, when an imported file imports its own components).
87
+
88
+ > **Caution — structural names.** Shadowing a structural built-in used by a composite element (`Row` / `Cell` inside `Table`) means every `<Row>` / `<Cell>` in the document — including those inside a `<Table>` — resolves to your component, which breaks table layout. Prefer names that do not collide with built-ins for reusable components.
89
+
90
+ ### Children
91
+
92
+ Element children may be other elements, components, the `{children}` slot (inside a component body), and `{array.map(...)}` over a **literal array**:
93
+
94
+ ```tsx
95
+ <VStack gap={5}>
96
+ {["alpha", "beta", "gamma"].map((label, i) => <Item t={label} n={i} />)}
97
+ </VStack>
98
+ ```
99
+
100
+ The array must be a literal so its length is known at compile time; the callback must be an inline function returning a single JSX element. Its parameter (and optional index) bind per element, while enclosing component props referenced in the body stay deferred until that component is expanded. Mapping over a runtime value (e.g. a component prop) or any other unsupported child expression is a **compile error**, never a silent drop. An unknown element name (neither a built-in nor a defined/imported component) is likewise a compile error.
101
+
102
+ ### Prop Expressions
103
+
104
+ Draw TSX is compiled statically — there is no JSX runtime. Prop expressions are therefore restricted to a grammar the compiler can **constant-fold at compile time**:
105
+
106
+ | Supported | Example |
107
+ |-----------|---------|
108
+ | Literals (number / string / boolean / template) | `width={50}`, `fill="#f00"`, `visible={false}` |
109
+ | Props references (inside a component) | `height={h}` |
110
+ | Arithmetic `+ - * / %` with standard precedence | `height={h - 16}`, `width={2 + 3 * 4}` (= `14`) |
111
+ | Parentheses and unary minus, arbitrarily nested | `width={-(h + 2) * 3 + 100}` |
112
+ | String concatenation (`string + string`) | `label={"REST " + "API"}` |
113
+ | Template literals with expression spans | `` id={`item-${i + 1}`} `` |
114
+ | Arrays and object literals of the above | `targets={["a", "b"]}`, `geometry={{ align: "x" }}` |
115
+
116
+ Arithmetic over component props is folded when the component is expanded, so `height={h - 16}` with `<Shell h={100} />` renders `84`.
117
+
118
+ Everything else is a **compile error** naming the prop and the offending syntax — unsupported expressions are never silently dropped to element defaults:
119
+
120
+ - Function calls (`Math.max(…)`), member access (`obj.w`), ternaries, logical operators (`&&`, `||`), spread attributes (`{...rest}`), and any other syntax → error.
121
+ - Arithmetic requires numbers; `+` also accepts two strings. Mixed string/number `+` is an error (no implicit coercion).
122
+ - Division or modulo by zero — and any other non-finite result, including overflowing literals like `1e999` — → error at compile time; non-finite values never reach layout.
123
+ - Referencing a prop that the caller did not provide inside an expression → error.
124
+ - Exception: `null` / `undefined` as the **entire prop value** mean "prop not set" (standard JSX semantics) and fall back to the element's schema default without a diagnostic. Inside an expression (`{5 + null}`, `{-null}`, `` {`a${undefined}`} ``) they are a compile error.
125
+
80
126
  ### Geometry Roles
81
127
 
82
128
  A mechanism for referencing internal child elements from outside a component. Specify `align` / `connect` roles via the `geometry` property so Connectors and AlignConstraints reference the correct element without breaking component internals.
@@ -357,4 +403,4 @@ Specifications, notation, and architecture are collected in [docs/](docs/).
357
403
  3. **Layout IR is JSON** — convergence point for all input formats
358
404
  4. **Rule Catalog is the language definition** — `layout-rules.yaml` / `constraint-rules.yaml` are the SSoT for all layout behavior
359
405
  5. **`style_props` is the property SSoT** — compiler validation is dynamically derived from YAML
360
- 6. **`required` is a hard constraint** — fail-fast if unsatisfiable
406
+ 6. **`required` is a hard constraint** — fail-fast if unsatisfiable
@@ -0,0 +1,133 @@
1
+ export function AwsService({ id, service, label }: { id: string; service: string; label: string }) {
2
+ return (
3
+ <VStack id={id} gap={4} align="center" geometry={{ align: `${id}-icon`, connect: `${id}-icon` }}>
4
+ <Icon id={`${id}-icon`} name={`aws:${service}`} width={48} height={48} />
5
+ <Text fontSize={11}>{label}</Text>
6
+ </VStack>
7
+ );
8
+ }
9
+
10
+ export function AwsServiceH({ id, service, label }: { id: string; service: string; label: string }) {
11
+ return (
12
+ <HStack id={id} gap={8} align="center" geometry={{ align: `${id}-icon`, connect: `${id}-icon` }}>
13
+ <Icon id={`${id}-icon`} name={`aws:${service}`} width={40} height={40} />
14
+ <Text fontSize={11}>{label}</Text>
15
+ </HStack>
16
+ );
17
+ }
18
+
19
+ export function AwsServiceSm({ id, service, label }: { id: string; service: string; label: string }) {
20
+ return (
21
+ <VStack id={id} gap={2} align="center" geometry={{ align: `${id}-icon`, connect: `${id}-icon` }}>
22
+ <Icon id={`${id}-icon`} name={`aws:${service}`} width={36} height={36} />
23
+ <Text fontSize={9}>{label}</Text>
24
+ </VStack>
25
+ );
26
+ }
27
+
28
+ export function AwsVpc({ label, children }: { label: string }) {
29
+ return (
30
+ <Box shape="rect" padding={0} stroke="#8c4fff" strokeWidth={2} fill="white">
31
+ <VStack gap={0}>
32
+ <Box shape="rect" fill="#8c4fff" stroke="#8c4fff" strokeWidth={0} padding={8}>
33
+ <HStack gap={6} align="center">
34
+ <Icon name="aws:vpc-group" width={18} height={18} />
35
+ <Text fontWeight="bold" fontSize={12} foreground="white">{label}</Text>
36
+ </HStack>
37
+ </Box>
38
+ {children}
39
+ </VStack>
40
+ </Box>
41
+ );
42
+ }
43
+
44
+ export function AwsPublicSubnet({ label, children }: { label: string }) {
45
+ return (
46
+ <Box shape="rect" padding={0} stroke="#7aa116" strokeWidth={1} strokeStyle="dashed" fill="white">
47
+ <VStack gap={0}>
48
+ <Box shape="rect" fill="#7aa116" stroke="#7aa116" strokeWidth={0} padding={6}>
49
+ <HStack gap={4} align="center">
50
+ <Icon name="aws:subnet-public" width={14} height={14} />
51
+ <Text fontSize={10} foreground="white" fontWeight="bold">{label}</Text>
52
+ </HStack>
53
+ </Box>
54
+ {children}
55
+ </VStack>
56
+ </Box>
57
+ );
58
+ }
59
+
60
+ export function AwsPrivateSubnet({ label, children }: { label: string }) {
61
+ return (
62
+ <Box shape="rect" padding={0} stroke="#00a4a6" strokeWidth={1} strokeStyle="dashed" fill="white">
63
+ <VStack gap={0}>
64
+ <Box shape="rect" fill="#00a4a6" stroke="#00a4a6" strokeWidth={0} padding={6}>
65
+ <HStack gap={4} align="center">
66
+ <Icon name="aws:subnet-private" width={14} height={14} />
67
+ <Text fontSize={10} foreground="white" fontWeight="bold">{label}</Text>
68
+ </HStack>
69
+ </Box>
70
+ {children}
71
+ </VStack>
72
+ </Box>
73
+ );
74
+ }
75
+
76
+ export function AwsAutoScaling({ id, label, geometry, children }: { id: string; label: string; geometry?: Record<string, string> }) {
77
+ return (
78
+ <Box id={id} shape="rect" padding={0} stroke="#ed7100" strokeWidth={1} strokeStyle="dashed" fill="white" geometry={geometry}>
79
+ <VStack gap={0}>
80
+ <Box shape="rect" fill="#ed7100" stroke="#ed7100" strokeWidth={0} padding={6}>
81
+ <HStack gap={4} align="center">
82
+ <Icon name="aws:auto-scaling-group" width={14} height={14} />
83
+ <Text fontSize={10} foreground="white" fontWeight="bold">{label}</Text>
84
+ </HStack>
85
+ </Box>
86
+ {children}
87
+ </VStack>
88
+ </Box>
89
+ );
90
+ }
91
+
92
+ export function AwsAccount({ label, children }: { label: string }) {
93
+ return (
94
+ <Box shape="rect" padding={0} stroke="#e7157b" strokeWidth={2} fill="white">
95
+ <VStack gap={0}>
96
+ <Box shape="rect" fill="#e7157b" stroke="#e7157b" strokeWidth={0} padding={8}>
97
+ <HStack gap={6} align="center">
98
+ <Icon name="aws:aws-account" width={16} height={16} />
99
+ <Text fontWeight="bold" fontSize={12} foreground="white">{label}</Text>
100
+ </HStack>
101
+ </Box>
102
+ {children}
103
+ </VStack>
104
+ </Box>
105
+ );
106
+ }
107
+
108
+ export function AwsRegion({ label, children }: { label: string }) {
109
+ return (
110
+ <Box shape="rect" padding={0} stroke="#00a4a6" strokeWidth={1} strokeStyle="dashed" fill="white">
111
+ <VStack gap={0}>
112
+ <Box shape="rect" fill="#00a4a6" stroke="#00a4a6" strokeWidth={0} padding={6}>
113
+ <HStack gap={4} align="center">
114
+ <Icon name="aws:region-group" width={14} height={14} />
115
+ <Text fontSize={11} foreground="white">{label}</Text>
116
+ </HStack>
117
+ </Box>
118
+ {children}
119
+ </VStack>
120
+ </Box>
121
+ );
122
+ }
123
+
124
+ export function EcsFargateCluster({ id, label }: { id: string; label: string }) {
125
+ return (
126
+ <AwsAutoScaling id={id} label={label}>
127
+ <HStack padding={8} gap={8} align="start">
128
+ <AwsServiceSm id={`${id}-ecs`} service="ecs" label="ECS" />
129
+ <AwsServiceSm id={`${id}-fg`} service="fargate" label="Fargate" />
130
+ </HStack>
131
+ </AwsAutoScaling>
132
+ );
133
+ }
@@ -0,0 +1,137 @@
1
+ <Document id="doc" padding={24} background="white" fontFamily="Inter, sans-serif">
2
+ <VStack id="root" gap={20}>
3
+ <Text id="title" fontSize={18} fontWeight="bold">ER Diagram — E-Commerce</Text>
4
+
5
+ <HStack id="cols" gap={40}>
6
+ <VStack id="col_left" gap={32}>
7
+ <Table id="users">
8
+ <Row id="u_h" fill="#dbeafe">
9
+ <Cell id="u_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#1e40af">users</Text></Cell>
10
+ <Cell id="u_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#1e40af">type</Text></Cell>
11
+ </Row>
12
+ <Row id="u1"><Cell id="u1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="u1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
13
+ <Row id="u2"><Cell id="u2a" padding={5} colAlign="left"><Text fontSize={10}>name</Text></Cell><Cell id="u2b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
14
+ <Row id="u3"><Cell id="u3a" padding={5} colAlign="left"><Text fontSize={10}>email</Text></Cell><Cell id="u3b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
15
+ <Row id="u4"><Cell id="u4a" padding={5} colAlign="left"><Text fontSize={10}>created_at</Text></Cell><Cell id="u4b" padding={5} colAlign="left"><Text fontSize={10}>timestamp</Text></Cell></Row>
16
+ </Table>
17
+
18
+ <Table id="addresses">
19
+ <Row id="ad_h" fill="#e0e7ff">
20
+ <Cell id="ad_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#3730a3">addresses</Text></Cell>
21
+ <Cell id="ad_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#3730a3">type</Text></Cell>
22
+ </Row>
23
+ <Row id="ad1"><Cell id="ad1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="ad1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
24
+ <Row id="ad2"><Cell id="ad2a" padding={5} colAlign="left"><Text fontSize={10}>user_id</Text></Cell><Cell id="ad2b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
25
+ <Row id="ad3"><Cell id="ad3a" padding={5} colAlign="left"><Text fontSize={10}>zip</Text></Cell><Cell id="ad3b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
26
+ <Row id="ad4"><Cell id="ad4a" padding={5} colAlign="left"><Text fontSize={10}>city</Text></Cell><Cell id="ad4b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
27
+ <Row id="ad5"><Cell id="ad5a" padding={5} colAlign="left"><Text fontSize={10}>line</Text></Cell><Cell id="ad5b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
28
+ </Table>
29
+ </VStack>
30
+
31
+ <VStack id="col_center" gap={32} align="center">
32
+ <Table id="reviews">
33
+ <Row id="rv_h" fill="#fef9c3">
34
+ <Cell id="rv_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#854d0e">reviews</Text></Cell>
35
+ <Cell id="rv_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#854d0e">type</Text></Cell>
36
+ </Row>
37
+ <Row id="rv1"><Cell id="rv1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="rv1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
38
+ <Row id="rv2"><Cell id="rv2a" padding={5} colAlign="left"><Text fontSize={10}>user_id</Text></Cell><Cell id="rv2b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
39
+ <Row id="rv3"><Cell id="rv3a" padding={5} colAlign="left"><Text fontSize={10}>product_id</Text></Cell><Cell id="rv3b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
40
+ <Row id="rv4"><Cell id="rv4a" padding={5} colAlign="left"><Text fontSize={10}>rating</Text></Cell><Cell id="rv4b" padding={5} colAlign="left"><Text fontSize={10}>int</Text></Cell></Row>
41
+ <Row id="rv5"><Cell id="rv5a" padding={5} colAlign="left"><Text fontSize={10}>comment</Text></Cell><Cell id="rv5b" padding={5} colAlign="left"><Text fontSize={10}>text</Text></Cell></Row>
42
+ </Table>
43
+
44
+ <Table id="orders">
45
+ <Row id="o_h" fill="#fef3c7">
46
+ <Cell id="o_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#92400e">orders</Text></Cell>
47
+ <Cell id="o_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#92400e">type</Text></Cell>
48
+ </Row>
49
+ <Row id="o1"><Cell id="o1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="o1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
50
+ <Row id="o2"><Cell id="o2a" padding={5} colAlign="left"><Text fontSize={10}>user_id</Text></Cell><Cell id="o2b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
51
+ <Row id="o3"><Cell id="o3a" padding={5} colAlign="left"><Text fontSize={10}>status</Text></Cell><Cell id="o3b" padding={5} colAlign="left"><Text fontSize={10}>enum</Text></Cell></Row>
52
+ <Row id="o4"><Cell id="o4a" padding={5} colAlign="left"><Text fontSize={10}>total</Text></Cell><Cell id="o4b" padding={5} colAlign="left"><Text fontSize={10}>decimal</Text></Cell></Row>
53
+ <Row id="o5"><Cell id="o5a" padding={5} colAlign="left"><Text fontSize={10}>ordered_at</Text></Cell><Cell id="o5b" padding={5} colAlign="left"><Text fontSize={10}>timestamp</Text></Cell></Row>
54
+ </Table>
55
+
56
+ <HStack id="order_children" gap={24}>
57
+ <Table id="shipments">
58
+ <Row id="sh_h" fill="#fce7f3">
59
+ <Cell id="sh_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#9d174d">shipments</Text></Cell>
60
+ <Cell id="sh_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#9d174d">type</Text></Cell>
61
+ </Row>
62
+ <Row id="sh1"><Cell id="sh1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="sh1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
63
+ <Row id="sh2"><Cell id="sh2a" padding={5} colAlign="left"><Text fontSize={10}>order_id</Text></Cell><Cell id="sh2b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
64
+ <Row id="sh3"><Cell id="sh3a" padding={5} colAlign="left"><Text fontSize={10}>address_id</Text></Cell><Cell id="sh3b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
65
+ <Row id="sh4"><Cell id="sh4a" padding={5} colAlign="left"><Text fontSize={10}>carrier</Text></Cell><Cell id="sh4b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
66
+ <Row id="sh5"><Cell id="sh5a" padding={5} colAlign="left"><Text fontSize={10}>shipped_at</Text></Cell><Cell id="sh5b" padding={5} colAlign="left"><Text fontSize={10}>timestamp</Text></Cell></Row>
67
+ </Table>
68
+
69
+ <Table id="payments">
70
+ <Row id="pm_h" fill="#fce7f3">
71
+ <Cell id="pm_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#9d174d">payments</Text></Cell>
72
+ <Cell id="pm_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#9d174d">type</Text></Cell>
73
+ </Row>
74
+ <Row id="pm1"><Cell id="pm1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="pm1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
75
+ <Row id="pm2"><Cell id="pm2a" padding={5} colAlign="left"><Text fontSize={10}>order_id</Text></Cell><Cell id="pm2b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
76
+ <Row id="pm3"><Cell id="pm3a" padding={5} colAlign="left"><Text fontSize={10}>method</Text></Cell><Cell id="pm3b" padding={5} colAlign="left"><Text fontSize={10}>enum</Text></Cell></Row>
77
+ <Row id="pm4"><Cell id="pm4a" padding={5} colAlign="left"><Text fontSize={10}>amount</Text></Cell><Cell id="pm4b" padding={5} colAlign="left"><Text fontSize={10}>decimal</Text></Cell></Row>
78
+ <Row id="pm5"><Cell id="pm5a" padding={5} colAlign="left"><Text fontSize={10}>paid_at</Text></Cell><Cell id="pm5b" padding={5} colAlign="left"><Text fontSize={10}>timestamp</Text></Cell></Row>
79
+ </Table>
80
+
81
+ <Table id="order_items">
82
+ <Row id="oi_h" fill="#fef3c7">
83
+ <Cell id="oi_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#92400e">order_items</Text></Cell>
84
+ <Cell id="oi_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#92400e">type</Text></Cell>
85
+ </Row>
86
+ <Row id="oi1"><Cell id="oi1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="oi1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
87
+ <Row id="oi2"><Cell id="oi2a" padding={5} colAlign="left"><Text fontSize={10}>order_id</Text></Cell><Cell id="oi2b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
88
+ <Row id="oi3"><Cell id="oi3a" padding={5} colAlign="left"><Text fontSize={10}>product_id</Text></Cell><Cell id="oi3b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
89
+ <Row id="oi4"><Cell id="oi4a" padding={5} colAlign="left"><Text fontSize={10}>qty</Text></Cell><Cell id="oi4b" padding={5} colAlign="left"><Text fontSize={10}>int</Text></Cell></Row>
90
+ <Row id="oi5"><Cell id="oi5a" padding={5} colAlign="left"><Text fontSize={10}>unit_price</Text></Cell><Cell id="oi5b" padding={5} colAlign="left"><Text fontSize={10}>decimal</Text></Cell></Row>
91
+ </Table>
92
+ </HStack>
93
+ </VStack>
94
+
95
+ <VStack id="col_right" gap={32}>
96
+ <Table id="categories">
97
+ <Row id="c_h" fill="#dcfce7">
98
+ <Cell id="c_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#166534">categories</Text></Cell>
99
+ <Cell id="c_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#166534">type</Text></Cell>
100
+ </Row>
101
+ <Row id="c1"><Cell id="c1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="c1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
102
+ <Row id="c2"><Cell id="c2a" padding={5} colAlign="left"><Text fontSize={10}>name</Text></Cell><Cell id="c2b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
103
+ <Row id="c3"><Cell id="c3a" padding={5} colAlign="left"><Text fontSize={10}>parent_id</Text></Cell><Cell id="c3b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
104
+ </Table>
105
+
106
+ <Table id="products">
107
+ <Row id="p_h" fill="#dcfce7">
108
+ <Cell id="p_h1" padding={6} colAlign="left"><Text fontWeight="bold" fontSize={11} foreground="#166534">products</Text></Cell>
109
+ <Cell id="p_h2" padding={6} colAlign="center"><Text fontWeight="bold" fontSize={10} foreground="#166534">type</Text></Cell>
110
+ </Row>
111
+ <Row id="p1"><Cell id="p1a" padding={5} colAlign="left"><Text fontSize={10} fontWeight="bold">id</Text></Cell><Cell id="p1b" padding={5} colAlign="left"><Text fontSize={10}>PK</Text></Cell></Row>
112
+ <Row id="p2"><Cell id="p2a" padding={5} colAlign="left"><Text fontSize={10}>name</Text></Cell><Cell id="p2b" padding={5} colAlign="left"><Text fontSize={10}>varchar</Text></Cell></Row>
113
+ <Row id="p3"><Cell id="p3a" padding={5} colAlign="left"><Text fontSize={10}>category_id</Text></Cell><Cell id="p3b" padding={5} colAlign="left"><Text fontSize={10}>FK</Text></Cell></Row>
114
+ <Row id="p4"><Cell id="p4a" padding={5} colAlign="left"><Text fontSize={10}>price</Text></Cell><Cell id="p4b" padding={5} colAlign="left"><Text fontSize={10}>decimal</Text></Cell></Row>
115
+ <Row id="p5"><Cell id="p5a" padding={5} colAlign="left"><Text fontSize={10}>stock</Text></Cell><Cell id="p5b" padding={5} colAlign="left"><Text fontSize={10}>int</Text></Cell></Row>
116
+ </Table>
117
+ </VStack>
118
+ </HStack>
119
+ </VStack>
120
+
121
+ <EqualizeWidth targets={["users", "addresses"]} strategy="max" />
122
+ <EqualizeWidth targets={["products", "categories"]} strategy="max" />
123
+ <AlignConstraint targets={["addresses", "shipments"]} anchor="shipments" axis="horizontal" align="start" />
124
+ <AlignConstraint targets={["orders", "products"]} anchor="orders" axis="horizontal" align="start" />
125
+
126
+ <Connector from="users" to="addresses" fromAnchor="bottom" toAnchor="top" route="orthogonal" cornerRadius={6} endArrow="filledArrow" arrowSize={0.7}><Label>1:N</Label></Connector>
127
+ <Connector from="u1" to="rv2" fromAnchor="right" toAnchor="left" route="curved" endArrow="arrow" arrowSize={0.7}><Label>1:N</Label></Connector>
128
+ <Connector from="u1" to="o2" fromAnchor="right" toAnchor="left" route="curved" endArrow="arrow" arrowSize={0.7}><Label>1:N</Label></Connector>
129
+ <Connector from="orders" to="order_items" fromAnchor="bottom" toAnchor="top" route="orthogonal" cornerRadius={6} endArrow="arrow" arrowSize={0.7}><Label>1:N</Label></Connector>
130
+ <Connector from="orders" to="payments" fromAnchor="bottom" toAnchor="top" route="orthogonal" cornerRadius={6} endArrow="arrow" arrowSize={0.7}><Label>1:1</Label></Connector>
131
+ <Connector from="orders" to="shipments" fromAnchor="bottom" toAnchor="top" route="orthogonal" cornerRadius={6} endArrow="arrow" arrowSize={0.7}><Label>1:N</Label></Connector>
132
+ <Connector from="ad1" to="sh3" fromAnchor="right" toAnchor="left" route="orthogonal" cornerRadius={6} endArrow="arrow" arrowSize={0.7}><Label>1:N</Label></Connector>
133
+ <Connector from="p1" to="oi3" fromAnchor="left" toAnchor="right" route="orthogonal" cornerRadius={6} endArrow="arrow" arrowSize={0.7}><Label>1:N</Label></Connector>
134
+ <Connector from="p1" to="rv3" fromAnchor="left" toAnchor="right" route="curved" endArrow="arrow" arrowSize={0.7}><Label>1:N</Label></Connector>
135
+ <Connector from="categories" to="products" fromAnchor="bottom" toAnchor="top" route="orthogonal" cornerRadius={6} endArrow="filledArrow" arrowSize={0.7}><Label>1:N</Label></Connector>
136
+ <Connector from="c1" to="c3" fromAnchor="right" toAnchor="right" route="orthogonal" cornerRadius={6} stroke="#16a34a" strokeDasharray="4 2" endArrow="arrow" arrowSize={0.7}><Label>self</Label></Connector>
137
+ </Document>
@@ -0,0 +1,20 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 847.68447265625 599.4000000000001" width="847.68447265625" height="599.4000000000001" font-family="Inter, sans-serif">
2
+ <defs>
3
+ <marker id="marker-filledArrow-6b7280-s0.7" markerWidth="4.8999999999999995" markerHeight="4.8999999999999995" refX="4.8999999999999995" refY="2.4499999999999997" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7 Z" fill="#6b7280" transform="scale(0.7)"/></marker>
4
+ <marker id="marker-arrow-6b7280-s0.7" markerWidth="4.8999999999999995" markerHeight="4.8999999999999995" refX="4.8999999999999995" refY="2.4499999999999997" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7" fill="none" stroke="#6b7280" stroke-width="1" transform="scale(0.7)"/></marker>
5
+ <marker id="marker-arrow-16a34a-s0.7" markerWidth="4.8999999999999995" markerHeight="4.8999999999999995" refX="4.8999999999999995" refY="2.4499999999999997" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7" fill="none" stroke="#16a34a" stroke-width="1" transform="scale(0.7)"/></marker>
6
+ </defs>
7
+ <rect x="0" y="0" width="847.68447265625" height="599.4000000000001" fill="white"/>
8
+ <g id="root"><g id="title"><text x="157.857861328125" y="43.1478515625" text-anchor="middle" fill="#111827" font-size="18" font-weight="bold"><tspan x="157.857861328125" dy="0">ER Diagram — E-Commerce</tspan></text></g><g id="cols"><g id="col_left"><g id="users"><defs><clipPath id="table-clip-1"><rect x="24" y="69.2" width="128.818359375" height="123.4" rx="6" ry="6"/></clipPath></defs><rect x="24" y="69.2" width="128.818359375" height="123.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-1)"><g id="u_h"><g id="u_h1"><rect x="24" y="69.2" width="64.55419921875" height="27.4" fill="#dbeafe" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_1"><text x="46.6109130859375" y="86.90146484375" text-anchor="middle" fill="#1e40af" font-size="11" font-weight="bold"><tspan x="46.6109130859375" dy="0">users</tspan></text></g></g><g id="u_h2"><rect x="88.55419921875" y="69.2" width="64.26416015625" height="27.4" fill="#dbeafe" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_2"><text x="120.686279296875" y="85.8376953125" text-anchor="middle" fill="#1e40af" font-size="10" font-weight="bold"><tspan x="120.686279296875" dy="0">type</tspan></text></g></g></g><g id="u1"><g id="u1a"><rect x="24" y="96.6" width="64.55419921875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_3"><text x="33.95751953125" y="112.2376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="33.95751953125" dy="0">id</tspan></text></g></g><g id="u1b"><rect x="88.55419921875" y="96.6" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_4"><text x="100.76220703125" y="112.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="100.76220703125" dy="0">PK</tspan></text></g></g></g><g id="u2"><g id="u2a"><rect x="24" y="120.6" width="64.55419921875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_5"><text x="43.3623046875" y="136.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="43.3623046875" dy="0">name</tspan></text></g></g><g id="u2b"><rect x="88.55419921875" y="120.6" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_6"><text x="113.357421875" y="136.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="113.357421875" dy="0">varchar</tspan></text></g></g></g><g id="u3"><g id="u3a"><rect x="24" y="144.60000000000002" width="64.55419921875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_7"><text x="42.77685546875" y="160.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="42.77685546875" dy="0">email</tspan></text></g></g><g id="u3b"><rect x="88.55419921875" y="144.60000000000002" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_8"><text x="113.357421875" y="160.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="113.357421875" dy="0">varchar</tspan></text></g></g></g><g id="u4"><g id="u4a"><rect x="24" y="168.60000000000002" width="64.55419921875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_9"><text x="56.277099609375" y="184.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="56.277099609375" dy="0">created_at</tspan></text></g></g><g id="u4b"><rect x="88.55419921875" y="168.60000000000002" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_10"><text x="120.686279296875" y="184.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="120.686279296875" dy="0">timestamp</tspan></text></g></g></g></g><rect x="24" y="69.2" width="128.818359375" height="123.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g><g id="addresses"><defs><clipPath id="table-clip-2"><rect x="24" y="428" width="128.818359375" height="147.4" rx="6" ry="6"/></clipPath></defs><rect x="24" y="428" width="128.818359375" height="147.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-2)"><g id="ad_h"><g id="ad_h1"><rect x="24" y="428" width="76.582666015625" height="27.4" fill="#e0e7ff" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_11"><text x="60.976708984375" y="445.70146484375" text-anchor="middle" fill="#3730a3" font-size="11" font-weight="bold"><tspan x="60.976708984375" dy="0">addresses</tspan></text></g></g><g id="ad_h2"><rect x="100.582666015625" y="428" width="52.235693359375" height="27.4" fill="#e0e7ff" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_12"><text x="126.7005126953125" y="444.6376953125" text-anchor="middle" fill="#3730a3" font-size="10" font-weight="bold"><tspan x="126.7005126953125" dy="0">type</tspan></text></g></g></g><g id="ad1"><g id="ad1a"><rect x="24" y="455.4" width="76.582666015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_13"><text x="33.95751953125" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="33.95751953125" dy="0">id</tspan></text></g></g><g id="ad1b"><rect x="100.582666015625" y="455.4" width="52.235693359375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_14"><text x="112.790673828125" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="112.790673828125" dy="0">PK</tspan></text></g></g></g><g id="ad2"><g id="ad2a"><rect x="24" y="479.4" width="76.582666015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_15"><text x="47.640380859375" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="47.640380859375" dy="0">user_id</tspan></text></g></g><g id="ad2b"><rect x="100.582666015625" y="479.4" width="52.235693359375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_16"><text x="112.5248046875" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="112.5248046875" dy="0">FK</tspan></text></g></g></g><g id="ad3"><g id="ad3a"><rect x="24" y="503.4" width="76.582666015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_17"><text x="36.737060546875" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="36.737060546875" dy="0">zip</tspan></text></g></g><g id="ad3b"><rect x="100.582666015625" y="503.4" width="52.235693359375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_18"><text x="125.385888671875" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="125.385888671875" dy="0">varchar</tspan></text></g></g></g><g id="ad4"><g id="ad4a"><rect x="24" y="527.4" width="76.582666015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_19"><text x="38.364501953125" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="38.364501953125" dy="0">city</tspan></text></g></g><g id="ad4b"><rect x="100.582666015625" y="527.4" width="52.235693359375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_20"><text x="125.385888671875" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="125.385888671875" dy="0">varchar</tspan></text></g></g></g><g id="ad5"><g id="ad5a"><rect x="24" y="551.4" width="76.582666015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_21"><text x="38.1201171875" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="38.1201171875" dy="0">line</tspan></text></g></g><g id="ad5b"><rect x="100.582666015625" y="551.4" width="52.235693359375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_22"><text x="125.385888671875" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="125.385888671875" dy="0">varchar</tspan></text></g></g></g></g><rect x="24" y="428" width="128.818359375" height="147.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g></g><g id="col_center"><g id="reviews"><defs><clipPath id="table-clip-3"><rect x="369.667333984375" y="69.2" width="101.1484375" height="147.4" rx="6" ry="6"/></clipPath></defs><rect x="369.667333984375" y="69.2" width="101.1484375" height="147.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-3)"><g id="rv_h"><g id="rv_h1"><rect x="369.667333984375" y="69.2" width="65.0107421875" height="27.4" fill="#fef9c3" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_23"><text x="399.1376708984375" y="86.90146484375" text-anchor="middle" fill="#854d0e" font-size="11" font-weight="bold"><tspan x="399.1376708984375" dy="0">reviews</tspan></text></g></g><g id="rv_h2"><rect x="434.678076171875" y="69.2" width="36.1376953125" height="27.4" fill="#fef9c3" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_24"><text x="452.746923828125" y="85.8376953125" text-anchor="middle" fill="#854d0e" font-size="10" font-weight="bold"><tspan x="452.746923828125" dy="0">type</tspan></text></g></g></g><g id="rv1"><g id="rv1a"><rect x="369.667333984375" y="96.6" width="65.0107421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_25"><text x="379.624853515625" y="112.2376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="379.624853515625" dy="0">id</tspan></text></g></g><g id="rv1b"><rect x="434.678076171875" y="96.6" width="36.1376953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_26"><text x="446.886083984375" y="112.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="446.886083984375" dy="0">PK</tspan></text></g></g></g><g id="rv2"><g id="rv2a"><rect x="369.667333984375" y="120.6" width="65.0107421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_27"><text x="393.30771484375" y="136.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="393.30771484375" dy="0">user_id</tspan></text></g></g><g id="rv2b"><rect x="434.678076171875" y="120.6" width="36.1376953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_28"><text x="446.62021484375" y="136.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="446.62021484375" dy="0">FK</tspan></text></g></g></g><g id="rv3"><g id="rv3a"><rect x="369.667333984375" y="144.60000000000002" width="65.0107421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_29"><text x="402.172705078125" y="160.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="402.172705078125" dy="0">product_id</tspan></text></g></g><g id="rv3b"><rect x="434.678076171875" y="144.60000000000002" width="36.1376953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_30"><text x="446.62021484375" y="160.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="446.62021484375" dy="0">FK</tspan></text></g></g></g><g id="rv4"><g id="rv4a"><rect x="369.667333984375" y="168.60000000000002" width="65.0107421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_31"><text x="389.58017578125" y="184.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="389.58017578125" dy="0">rating</tspan></text></g></g><g id="rv4b"><rect x="434.678076171875" y="168.60000000000002" width="36.1376953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_32"><text x="446.058935546875" y="184.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="446.058935546875" dy="0">int</tspan></text></g></g></g><g id="rv5"><g id="rv5a"><rect x="369.667333984375" y="192.60000000000002" width="65.0107421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_33"><text x="398.998388671875" y="208.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="398.998388671875" dy="0">comment</tspan></text></g></g><g id="rv5b"><rect x="434.678076171875" y="192.60000000000002" width="36.1376953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_34"><text x="449.485693359375" y="208.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="449.485693359375" dy="0">text</tspan></text></g></g></g></g><rect x="369.667333984375" y="69.2" width="101.1484375" height="147.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g><g id="orders"><defs><clipPath id="table-clip-4"><rect x="355.12607421875" y="248.60000000000002" width="130.23095703125" height="147.4" rx="6" ry="6"/></clipPath></defs><rect x="355.12607421875" y="248.60000000000002" width="130.23095703125" height="147.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-4)"><g id="o_h"><g id="o_h1"><rect x="355.12607421875" y="248.60000000000002" width="65.966796875" height="27.4" fill="#fef3c7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_35"><text x="380.56997070312497" y="266.30146484375" text-anchor="middle" fill="#92400e" font-size="11" font-weight="bold"><tspan x="380.56997070312497" dy="0">orders</tspan></text></g></g><g id="o_h2"><rect x="421.09287109375" y="248.60000000000002" width="64.26416015625" height="27.4" fill="#fef3c7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_36"><text x="453.224951171875" y="265.2376953125" text-anchor="middle" fill="#92400e" font-size="10" font-weight="bold"><tspan x="453.224951171875" dy="0">type</tspan></text></g></g></g><g id="o1"><g id="o1a"><rect x="355.12607421875" y="276" width="65.966796875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_37"><text x="365.08359375" y="291.6376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="365.08359375" dy="0">id</tspan></text></g></g><g id="o1b"><rect x="421.09287109375" y="276" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_38"><text x="433.30087890625" y="291.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="433.30087890625" dy="0">PK</tspan></text></g></g></g><g id="o2"><g id="o2a"><rect x="355.12607421875" y="300" width="65.966796875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_39"><text x="378.766455078125" y="315.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="378.766455078125" dy="0">user_id</tspan></text></g></g><g id="o2b"><rect x="421.09287109375" y="300" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_40"><text x="433.035009765625" y="315.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="433.035009765625" dy="0">FK</tspan></text></g></g></g><g id="o3"><g id="o3a"><rect x="355.12607421875" y="324" width="65.966796875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_41"><text x="375.871435546875" y="339.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="375.871435546875" dy="0">status</tspan></text></g></g><g id="o3b"><rect x="421.09287109375" y="324" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_42"><text x="440.618994140625" y="339.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="440.618994140625" dy="0">enum</tspan></text></g></g></g><g id="o4"><g id="o4a"><rect x="355.12607421875" y="348" width="65.966796875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_43"><text x="371.44296875" y="363.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="371.44296875" dy="0">total</tspan></text></g></g><g id="o4b"><rect x="421.09287109375" y="348" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_44"><text x="446.3794921875" y="363.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="446.3794921875" dy="0">decimal</tspan></text></g></g></g><g id="o5"><g id="o5a"><rect x="355.12607421875" y="372" width="65.966796875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_45"><text x="388.10947265625" y="387.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="388.10947265625" dy="0">ordered_at</tspan></text></g></g><g id="o5b"><rect x="421.09287109375" y="372" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_46"><text x="453.224951171875" y="387.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="453.224951171875" dy="0">timestamp</tspan></text></g></g></g></g><rect x="355.12607421875" y="248.60000000000002" width="130.23095703125" height="147.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g><g id="order_children"><g id="shipments"><defs><clipPath id="table-clip-5"><rect x="192.818359375" y="428" width="138.471630859375" height="147.4" rx="6" ry="6"/></clipPath></defs><rect x="192.818359375" y="428" width="138.471630859375" height="147.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-5)"><g id="sh_h"><g id="sh_h1"><rect x="192.818359375" y="428" width="74.20747070312501" height="27.4" fill="#fce7f3" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_47"><text x="229.9220947265625" y="445.70146484375" text-anchor="middle" fill="#9d174d" font-size="11" font-weight="bold"><tspan x="229.9220947265625" dy="0">shipments</tspan></text></g></g><g id="sh_h2"><rect x="267.025830078125" y="428" width="64.26416015625" height="27.4" fill="#fce7f3" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_48"><text x="299.15791015625" y="444.6376953125" text-anchor="middle" fill="#9d174d" font-size="10" font-weight="bold"><tspan x="299.15791015625" dy="0">type</tspan></text></g></g></g><g id="sh1"><g id="sh1a"><rect x="192.818359375" y="455.4" width="74.20747070312501" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_49"><text x="202.77587890625" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="202.77587890625" dy="0">id</tspan></text></g></g><g id="sh1b"><rect x="267.025830078125" y="455.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_50"><text x="279.233837890625" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="279.233837890625" dy="0">PK</tspan></text></g></g></g><g id="sh2"><g id="sh2a"><rect x="192.818359375" y="479.4" width="74.20747070312501" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_51"><text x="219.03955078125" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="219.03955078125" dy="0">order_id</tspan></text></g></g><g id="sh2b"><rect x="267.025830078125" y="479.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_52"><text x="278.96796875" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="278.96796875" dy="0">FK</tspan></text></g></g></g><g id="sh3"><g id="sh3a"><rect x="192.818359375" y="503.4" width="74.20747070312501" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_53"><text x="225.933349609375" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="225.933349609375" dy="0">address_id</tspan></text></g></g><g id="sh3b"><rect x="267.025830078125" y="503.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_54"><text x="278.96796875" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="278.96796875" dy="0">FK</tspan></text></g></g></g><g id="sh4"><g id="sh4a"><rect x="192.818359375" y="527.4" width="74.20747070312501" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_55"><text x="214.799072265625" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="214.799072265625" dy="0">carrier</tspan></text></g></g><g id="sh4b"><rect x="267.025830078125" y="527.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_56"><text x="291.829052734375" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="291.829052734375" dy="0">varchar</tspan></text></g></g></g><g id="sh5"><g id="sh5a"><rect x="192.818359375" y="551.4" width="74.20747070312501" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_57"><text x="226.01123046875" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="226.01123046875" dy="0">shipped_at</tspan></text></g></g><g id="sh5b"><rect x="267.025830078125" y="551.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_58"><text x="299.15791015625" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="299.15791015625" dy="0">timestamp</tspan></text></g></g></g></g><rect x="192.818359375" y="428" width="138.471630859375" height="147.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g><g id="payments"><defs><clipPath id="table-clip-6"><rect x="355.289990234375" y="428" width="135.192578125" height="147.4" rx="6" ry="6"/></clipPath></defs><rect x="355.289990234375" y="428" width="135.192578125" height="147.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-6)"><g id="pm_h"><g id="pm_h1"><rect x="355.289990234375" y="428" width="70.92841796875001" height="27.4" fill="#fce7f3" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_59"><text x="390.75419921875" y="445.70146484375" text-anchor="middle" fill="#9d174d" font-size="11" font-weight="bold"><tspan x="390.75419921875" dy="0">payments</tspan></text></g></g><g id="pm_h2"><rect x="426.218408203125" y="428" width="64.26416015625" height="27.4" fill="#fce7f3" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_60"><text x="458.35048828125" y="444.6376953125" text-anchor="middle" fill="#9d174d" font-size="10" font-weight="bold"><tspan x="458.35048828125" dy="0">type</tspan></text></g></g></g><g id="pm1"><g id="pm1a"><rect x="355.289990234375" y="455.4" width="70.92841796875001" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_61"><text x="365.247509765625" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="365.247509765625" dy="0">id</tspan></text></g></g><g id="pm1b"><rect x="426.218408203125" y="455.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_62"><text x="438.426416015625" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="438.426416015625" dy="0">PK</tspan></text></g></g></g><g id="pm2"><g id="pm2a"><rect x="355.289990234375" y="479.4" width="70.92841796875001" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_63"><text x="381.511181640625" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="381.511181640625" dy="0">order_id</tspan></text></g></g><g id="pm2b"><rect x="426.218408203125" y="479.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_64"><text x="438.160546875" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="438.160546875" dy="0">FK</tspan></text></g></g></g><g id="pm3"><g id="pm3a"><rect x="355.289990234375" y="503.4" width="70.92841796875001" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_65"><text x="380.0314453125" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="380.0314453125" dy="0">method</tspan></text></g></g><g id="pm3b"><rect x="426.218408203125" y="503.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_66"><text x="445.74453125" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="445.74453125" dy="0">enum</tspan></text></g></g></g><g id="pm4"><g id="pm4a"><rect x="355.289990234375" y="527.4" width="70.92841796875001" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_67"><text x="379.7951171875" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="379.7951171875" dy="0">amount</tspan></text></g></g><g id="pm4b"><rect x="426.218408203125" y="527.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_68"><text x="451.505029296875" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="451.505029296875" dy="0">decimal</tspan></text></g></g></g><g id="pm5"><g id="pm5a"><rect x="355.289990234375" y="551.4" width="70.92841796875001" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_69"><text x="378.841748046875" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="378.841748046875" dy="0">paid_at</tspan></text></g></g><g id="pm5b"><rect x="426.218408203125" y="551.4" width="64.26416015625" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_70"><text x="458.35048828125" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="458.35048828125" dy="0">timestamp</tspan></text></g></g></g></g><rect x="355.289990234375" y="428" width="135.192578125" height="147.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g><g id="order_items"><defs><clipPath id="table-clip-7"><rect x="514.482568359375" y="428" width="133.182177734375" height="147.4" rx="6" ry="6"/></clipPath></defs><rect x="514.482568359375" y="428" width="133.182177734375" height="147.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-7)"><g id="oi_h"><g id="oi_h1"><rect x="514.482568359375" y="428" width="82.608935546875" height="27.4" fill="#fef3c7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_71"><text x="555.7870361328125" y="445.70146484375" text-anchor="middle" fill="#92400e" font-size="11" font-weight="bold"><tspan x="555.7870361328125" dy="0">order_items</tspan></text></g></g><g id="oi_h2"><rect x="597.0915039062501" y="428" width="50.5732421875" height="27.4" fill="#fef3c7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_72"><text x="622.3781250000001" y="444.6376953125" text-anchor="middle" fill="#92400e" font-size="10" font-weight="bold"><tspan x="622.3781250000001" dy="0">type</tspan></text></g></g></g><g id="oi1"><g id="oi1a"><rect x="514.482568359375" y="455.4" width="82.608935546875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_73"><text x="524.440087890625" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="524.440087890625" dy="0">id</tspan></text></g></g><g id="oi1b"><rect x="597.0915039062501" y="455.4" width="50.5732421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_74"><text x="609.2995117187501" y="471.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="609.2995117187501" dy="0">PK</tspan></text></g></g></g><g id="oi2"><g id="oi2a"><rect x="514.482568359375" y="479.4" width="82.608935546875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_75"><text x="540.703759765625" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="540.703759765625" dy="0">order_id</tspan></text></g></g><g id="oi2b"><rect x="597.0915039062501" y="479.4" width="50.5732421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_76"><text x="609.0336425781251" y="495.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="609.0336425781251" dy="0">FK</tspan></text></g></g></g><g id="oi3"><g id="oi3a"><rect x="514.482568359375" y="503.4" width="82.608935546875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_77"><text x="546.987939453125" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="546.987939453125" dy="0">product_id</tspan></text></g></g><g id="oi3b"><rect x="597.0915039062501" y="503.4" width="50.5732421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_78"><text x="609.0336425781251" y="519.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="609.0336425781251" dy="0">FK</tspan></text></g></g></g><g id="oi4"><g id="oi4a"><rect x="514.482568359375" y="527.4" width="82.608935546875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_79"><text x="527.740625" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="527.740625" dy="0">qty</tspan></text></g></g><g id="oi4b"><rect x="597.0915039062501" y="527.4" width="50.5732421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_80"><text x="608.4723632812501" y="543.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="608.4723632812501" dy="0">int</tspan></text></g></g></g><g id="oi5"><g id="oi5a"><rect x="514.482568359375" y="551.4" width="82.608935546875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_81"><text x="544.742822265625" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="544.742822265625" dy="0">unit_price</tspan></text></g></g><g id="oi5b"><rect x="597.0915039062501" y="551.4" width="50.5732421875" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_82"><text x="622.3781250000001" y="567.0376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="622.3781250000001" dy="0">decimal</tspan></text></g></g></g></g><rect x="514.482568359375" y="428" width="133.182177734375" height="147.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g></g></g><g id="col_right"><g id="categories"><defs><clipPath id="table-clip-8"><rect x="687.66474609375" y="69.2" width="124.64697265625" height="99.4" rx="6" ry="6"/></clipPath></defs><rect x="687.66474609375" y="69.2" width="124.64697265625" height="99.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-8)"><g id="c_h"><g id="c_h1"><rect x="687.66474609375" y="69.2" width="75.04052734375" height="27.4" fill="#dcfce7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_83"><text x="725.185009765625" y="86.90146484375" text-anchor="middle" fill="#166534" font-size="11" font-weight="bold"><tspan x="725.185009765625" dy="0">categories</tspan></text></g></g><g id="c_h2"><rect x="762.7052734375" y="69.2" width="49.6064453125" height="27.4" fill="#dcfce7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_84"><text x="787.50849609375" y="85.8376953125" text-anchor="middle" fill="#166534" font-size="10" font-weight="bold"><tspan x="787.50849609375" dy="0">type</tspan></text></g></g></g><g id="c1"><g id="c1a"><rect x="687.66474609375" y="96.6" width="75.04052734375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_85"><text x="697.622265625" y="112.2376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="697.622265625" dy="0">id</tspan></text></g></g><g id="c1b"><rect x="762.7052734375" y="96.6" width="49.6064453125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_86"><text x="774.91328125" y="112.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="774.91328125" dy="0">PK</tspan></text></g></g></g><g id="c2"><g id="c2a"><rect x="687.66474609375" y="120.6" width="75.04052734375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_87"><text x="707.02705078125" y="136.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="707.02705078125" dy="0">name</tspan></text></g></g><g id="c2b"><rect x="762.7052734375" y="120.6" width="49.6064453125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_88"><text x="787.50849609375" y="136.2376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="787.50849609375" dy="0">varchar</tspan></text></g></g></g><g id="c3"><g id="c3a"><rect x="687.66474609375" y="144.60000000000002" width="75.04052734375" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_89"><text x="716.654736328125" y="160.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="716.654736328125" dy="0">parent_id</tspan></text></g></g><g id="c3b"><rect x="762.7052734375" y="144.60000000000002" width="49.6064453125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_90"><text x="774.647412109375" y="160.23769531250002" text-anchor="middle" fill="#111827" font-size="10"><tspan x="774.647412109375" dy="0">FK</tspan></text></g></g></g></g><rect x="687.66474609375" y="69.2" width="124.64697265625" height="99.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g><g id="products"><defs><clipPath id="table-clip-9"><rect x="687.66474609375" y="248.60000000000002" width="124.64697265625" height="147.4" rx="6" ry="6"/></clipPath></defs><rect x="687.66474609375" y="248.60000000000002" width="124.64697265625" height="147.4" rx="6" ry="6" fill="white"/><g clip-path="url(#table-clip-9)"><g id="p_h"><g id="p_h1"><rect x="687.66474609375" y="248.60000000000002" width="72.313720703125" height="27.4" fill="#dcfce7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_91"><text x="720.3964111328124" y="266.30146484375" text-anchor="middle" fill="#166534" font-size="11" font-weight="bold"><tspan x="720.3964111328124" dy="0">products</tspan></text></g></g><g id="p_h2"><rect x="759.978466796875" y="248.60000000000002" width="52.333251953125" height="27.4" fill="#dcfce7" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_92"><text x="786.1450927734375" y="265.2376953125" text-anchor="middle" fill="#166534" font-size="10" font-weight="bold"><tspan x="786.1450927734375" dy="0">type</tspan></text></g></g></g><g id="p1"><g id="p1a"><rect x="687.66474609375" y="276" width="72.313720703125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_93"><text x="697.622265625" y="291.6376953125" text-anchor="middle" fill="#111827" font-size="10" font-weight="bold"><tspan x="697.622265625" dy="0">id</tspan></text></g></g><g id="p1b"><rect x="759.978466796875" y="276" width="52.333251953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_94"><text x="772.186474609375" y="291.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="772.186474609375" dy="0">PK</tspan></text></g></g></g><g id="p2"><g id="p2a"><rect x="687.66474609375" y="300" width="72.313720703125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_95"><text x="707.02705078125" y="315.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="707.02705078125" dy="0">name</tspan></text></g></g><g id="p2b"><rect x="759.978466796875" y="300" width="52.333251953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_96"><text x="784.781689453125" y="315.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="784.781689453125" dy="0">varchar</tspan></text></g></g></g><g id="p3"><g id="p3a"><rect x="687.66474609375" y="324" width="72.313720703125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_97"><text x="722.9416015625" y="339.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="722.9416015625" dy="0">category_id</tspan></text></g></g><g id="p3b"><rect x="759.978466796875" y="324" width="52.333251953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_98"><text x="771.92060546875" y="339.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="771.92060546875" dy="0">FK</tspan></text></g></g></g><g id="p4"><g id="p4a"><rect x="687.66474609375" y="348" width="72.313720703125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_99"><text x="705.783642578125" y="363.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="705.783642578125" dy="0">price</tspan></text></g></g><g id="p4b"><rect x="759.978466796875" y="348" width="52.333251953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_100"><text x="785.265087890625" y="363.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="785.265087890625" dy="0">decimal</tspan></text></g></g></g><g id="p5"><g id="p5a"><rect x="687.66474609375" y="372" width="72.313720703125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_101"><text x="706.825634765625" y="387.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="706.825634765625" dy="0">stock</tspan></text></g></g><g id="p5b"><rect x="759.978466796875" y="372" width="52.333251953125" height="24" fill="none" stroke="#e5e7eb" stroke-width="0.5"/><g id="text_102"><text x="771.359326171875" y="387.6376953125" text-anchor="middle" fill="#111827" font-size="10"><tspan x="771.359326171875" dy="0">int</tspan></text></g></g></g></g><rect x="687.66474609375" y="248.60000000000002" width="124.64697265625" height="147.4" rx="6" ry="6" fill="none" stroke="#d1d5db" stroke-width="1"/></g></g></g></g>
9
+ <g id="connector_1"><path d="M 88.4091796875 192.60000000000002 L 88.4091796875 310.3 L 88.4091796875 310.3 L 88.4091796875 428" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-filledArrow-6b7280-s0.7)"/><g id="label_1"><rect x="76.85078125" y="299.90000000000003" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="88.4091796875" y="314.665234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="88.4091796875" dy="0">1:N</tspan></text></g></g>
10
+ <g id="connector_2"><path d="M 152.818359375 104.6 C 224.97259924513554 104.6, 297.51309411423944 132.6, 369.667333984375 132.6" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_2"><rect x="249.6844482421875" y="108.19999999999999" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="261.2428466796875" y="122.965234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="261.2428466796875" dy="0">1:N</tspan></text></g></g>
11
+ <g id="connector_3"><path d="M 152.818359375 112.6 C 246.55739721276092 112.6, 261.38703638098906 312, 355.12607421875 312" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_3"><rect x="242.413818359375" y="201.9" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="253.972216796875" y="216.665234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="253.972216796875" dy="0">1:N</tspan></text></g></g>
12
+ <g id="connector_4"><path d="M 452.7992919921875 396 L 452.7992919921875 406 A 6 6 0 0 0 458.7992919921875 412 L 575.0736572265625 412 A 6 6 0 0 1 581.0736572265625 418 L 581.0736572265625 428" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_4"><rect x="505.37807617187497" y="401.6" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="516.936474609375" y="416.365234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="516.936474609375" dy="0">1:N</tspan></text></g></g>
13
+ <g id="connector_5"><path d="M 420.241552734375 396 L 420.241552734375 410.67763671874997 A 1.322363281250034 1.322363281250034 0 0 0 421.563916015625 412 L 421.563916015625 412 A 1.322363281250034 1.322363281250034 0 0 1 422.88627929687505 413.32236328125003 L 422.88627929687505 428" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_5"><rect x="412.293603515625" y="401.6" width="18.540625" height="20.799999999999997" fill="#ffffff"/><text x="421.563916015625" y="416.365234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="421.563916015625" dy="0">1:1</tspan></text></g></g>
14
+ <g id="connector_6"><path d="M 387.6838134765625 396 L 387.6838134765625 406 A 6 6 0 0 1 381.6838134765625 412 L 268.0541748046875 412 A 6 6 0 0 0 262.0541748046875 418 L 262.0541748046875 428" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_6"><rect x="313.310595703125" y="401.6" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="324.868994140625" y="416.365234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="324.868994140625" dy="0">1:N</tspan></text></g></g>
15
+ <g id="connector_7"><path d="M 152.818359375 467.4 L 166.818359375 467.4 A 6 6 0 0 1 172.818359375 473.4 L 172.818359375 509.4 A 6 6 0 0 0 178.818359375 515.4 L 192.818359375 515.4" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_7"><rect x="161.2599609375" y="481" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="172.818359375" y="495.765234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="172.818359375" dy="0">1:N</tspan></text></g></g>
16
+ <g id="connector_8"><path d="M 687.66474609375 292 L 673.66474609375 292 A 6 6 0 0 0 667.66474609375 298 L 667.66474609375 509.4 A 6 6 0 0 1 661.66474609375 515.4 L 647.66474609375 515.4" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_8"><rect x="656.1063476562499" y="393.3" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="667.66474609375" y="408.065234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="667.66474609375" dy="0">1:N</tspan></text></g></g>
17
+ <g id="connector_9"><path d="M 687.66474609375 284 C 604.6684419878618 284, 553.812075590263 156.60000000000002, 470.815771484375 156.60000000000002" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-arrow-6b7280-s0.7)"/><g id="label_9"><rect x="567.6818603515624" y="209.9" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="579.2402587890624" y="224.665234375" text-anchor="middle" fill="#111827" font-size="12"><tspan x="579.2402587890624" dy="0">1:N</tspan></text></g></g>
18
+ <g id="connector_10"><path d="M 749.988232421875 168.60000000000002 L 749.988232421875 208.60000000000002 L 749.988232421875 208.60000000000002 L 749.988232421875 248.60000000000002" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#marker-filledArrow-6b7280-s0.7)"/><g id="label_10"><rect x="738.4298339843749" y="198.20000000000002" width="23.116796875000002" height="20.799999999999997" fill="#ffffff"/><text x="749.988232421875" y="212.96523437500002" text-anchor="middle" fill="#111827" font-size="12"><tspan x="749.988232421875" dy="0">1:N</tspan></text></g></g>
19
+ <g id="connector_11"><path d="M 812.31171875 108.6 L 826.31171875 108.6 A 6 6 0 0 1 832.31171875 114.6 L 832.31171875 150.60000000000002 A 6 6 0 0 1 826.31171875 156.60000000000002 L 812.31171875 156.60000000000002" fill="none" stroke="#16a34a" stroke-width="1.5" stroke-dasharray="4 2" marker-end="url(#marker-arrow-16a34a-s0.7)"/><g id="label_11"><rect x="798.93896484375" y="122.20000000000002" width="26.7455078125" height="20.799999999999997" fill="#ffffff"/><text x="812.31171875" y="136.96523437500002" text-anchor="middle" fill="#111827" font-size="12"><tspan x="812.31171875" dy="0">self</tspan></text></g></g>
20
+ </svg>