-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4_InventoryService_ERD.drawio
More file actions
177 lines (177 loc) Β· 13.4 KB
/
Copy path4_InventoryService_ERD.drawio
File metadata and controls
177 lines (177 loc) Β· 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<mxfile host="app.diagrams.net" pages="2">
<diagram id="cnf8WrpCJ3x9BIRFDn6v" name="Page-1">
<mxGraphModel dx="1406" dy="814" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="100" parent="1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;" value="Inventory Service β Entity Relationship Diagram" vertex="1">
<mxGeometry height="40" width="600" x="160" y="30" as="geometry" />
</mxCell>
<mxCell id="2" parent="1" style="swimlane;startSize=30;fontStyle=1;align=center;fillColor=default;strokeColor=default;fontSize=14;" value="inventory" vertex="1">
<mxGeometry height="310" width="380" x="50" y="100" as="geometry" />
</mxCell>
<mxCell id="3" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="30" as="geometry" />
</mxCell>
<mxCell id="3a" parent="3" style="text;align=left;spacingLeft=8;fontStyle=1;fillColor=default;strokeColor=none;" value="π id" vertex="1">
<mxGeometry height="30" width="190" as="geometry" />
</mxCell>
<mxCell id="3b" parent="3" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="UUID β PRIMARY KEY" vertex="1">
<mxGeometry height="30" width="190" x="190" as="geometry" />
</mxCell>
<mxCell id="4" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=#fff2cc;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="60" as="geometry" />
</mxCell>
<mxCell id="4a" parent="4" style="text;align=left;spacingLeft=8;fontStyle=2;fillColor=default;strokeColor=none;" value=" product_id β logical FK" vertex="1">
<mxGeometry height="30" width="210" as="geometry" />
</mxCell>
<mxCell id="4b" parent="4" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="UUID NOT NULL UNIQUE" vertex="1">
<mxGeometry height="30" width="170" x="210" as="geometry" />
</mxCell>
<mxCell id="5" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=#f5f5f5;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="90" as="geometry" />
</mxCell>
<mxCell id="5a" parent="5" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" available_qty" vertex="1">
<mxGeometry height="30" width="190" as="geometry" />
</mxCell>
<mxCell id="5b" parent="5" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="INTEGER NOT NULL DEFAULT 0" vertex="1">
<mxGeometry height="30" width="190" x="190" as="geometry" />
</mxCell>
<mxCell id="6" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="120" as="geometry" />
</mxCell>
<mxCell id="6a" parent="6" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" reserved_qty" vertex="1">
<mxGeometry height="30" width="190" as="geometry" />
</mxCell>
<mxCell id="6b" parent="6" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="INTEGER NOT NULL DEFAULT 0" vertex="1">
<mxGeometry height="30" width="190" x="190" as="geometry" />
</mxCell>
<mxCell id="7" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=default;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="150" as="geometry" />
</mxCell>
<mxCell id="7a" parent="7" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" sold_qty" vertex="1">
<mxGeometry height="30" width="190" as="geometry" />
</mxCell>
<mxCell id="7b" parent="7" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="INTEGER NOT NULL DEFAULT 0" vertex="1">
<mxGeometry height="30" width="190" x="190" as="geometry" />
</mxCell>
<mxCell id="8" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="180" as="geometry" />
</mxCell>
<mxCell id="8a" parent="8" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" low_stock_threshold" vertex="1">
<mxGeometry height="30" width="190" as="geometry" />
</mxCell>
<mxCell id="8b" parent="8" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="INTEGER NOT NULL DEFAULT 10" vertex="1">
<mxGeometry height="30" width="190" x="190" as="geometry" />
</mxCell>
<mxCell id="9" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=#f5f5f5;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="210" as="geometry" />
</mxCell>
<mxCell id="9a" parent="9" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" created_at" vertex="1">
<mxGeometry height="30" width="190" as="geometry" />
</mxCell>
<mxCell id="9b" parent="9" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="TIMESTAMP NOT NULL" vertex="1">
<mxGeometry height="30" width="190" x="190" as="geometry" />
</mxCell>
<mxCell id="10" parent="2" style="swimlane;startSize=0;horizontal=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="30" width="380" y="240" as="geometry" />
</mxCell>
<mxCell id="10a" parent="10" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" updated_at" vertex="1">
<mxGeometry height="30" width="190" as="geometry" />
</mxCell>
<mxCell id="10b" parent="10" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="TIMESTAMP NOT NULL" vertex="1">
<mxGeometry height="30" width="190" x="190" as="geometry" />
</mxCell>
<mxCell id="20" parent="1" style="swimlane;startSize=30;fontStyle=1;align=center;fillColor=default;strokeColor=default;fontSize=14;" value="stock_reservations" vertex="1">
<mxGeometry height="280" width="420" x="620" y="100" as="geometry" />
</mxCell>
<mxCell id="21" parent="20" style="swimlane;startSize=0;horizontal=0;fillColor=#d5e8d4;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="30" width="420" y="30" as="geometry" />
</mxCell>
<mxCell id="21a" parent="21" style="text;align=left;spacingLeft=8;fontStyle=1;fillColor=default;strokeColor=none;" value="π id" vertex="1">
<mxGeometry height="30" width="210" as="geometry" />
</mxCell>
<mxCell id="21b" parent="21" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="UUID β PRIMARY KEY" vertex="1">
<mxGeometry height="30" width="210" x="210" as="geometry" />
</mxCell>
<mxCell id="22" parent="20" style="swimlane;startSize=0;horizontal=0;fillColor=#f8cecc;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="30" width="420" y="60" as="geometry" />
</mxCell>
<mxCell id="22a" parent="22" style="text;align=left;spacingLeft=8;fontStyle=1;fillColor=default;strokeColor=none;" value="π inventory_id (real FK)" vertex="1">
<mxGeometry height="30" width="220" as="geometry" />
</mxCell>
<mxCell id="22b" parent="22" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="UUID NOT NULL β inventory.id" vertex="1">
<mxGeometry height="30" width="200" x="220" as="geometry" />
</mxCell>
<mxCell id="23" parent="20" style="swimlane;startSize=0;horizontal=0;fillColor=#f5f5f5;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="30" width="420" y="90" as="geometry" />
</mxCell>
<mxCell id="23a" parent="23" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" order_id" vertex="1">
<mxGeometry height="30" width="210" as="geometry" />
</mxCell>
<mxCell id="23b" parent="23" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="UUID NOT NULL" vertex="1">
<mxGeometry height="30" width="210" x="210" as="geometry" />
</mxCell>
<mxCell id="24" parent="20" style="swimlane;startSize=0;horizontal=0;fillColor=#d5e8d4;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="30" width="420" y="120" as="geometry" />
</mxCell>
<mxCell id="24a" parent="24" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" qty" vertex="1">
<mxGeometry height="30" width="210" as="geometry" />
</mxCell>
<mxCell id="24b" parent="24" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="INTEGER NOT NULL" vertex="1">
<mxGeometry height="30" width="210" x="210" as="geometry" />
</mxCell>
<mxCell id="25" parent="20" style="swimlane;startSize=0;horizontal=0;fillColor=#f5f5f5;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="30" width="420" y="150" as="geometry" />
</mxCell>
<mxCell id="25a" parent="25" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" status" vertex="1">
<mxGeometry height="30" width="210" as="geometry" />
</mxCell>
<mxCell id="25b" parent="25" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="VARCHAR(50) NOT NULL" vertex="1">
<mxGeometry height="30" width="210" x="210" as="geometry" />
</mxCell>
<mxCell id="26" parent="20" style="swimlane;startSize=0;horizontal=0;fillColor=#d5e8d4;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="30" width="420" y="180" as="geometry" />
</mxCell>
<mxCell id="26a" parent="26" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value=" expires_at" vertex="1">
<mxGeometry height="30" width="210" as="geometry" />
</mxCell>
<mxCell id="26b" parent="26" style="text;align=left;spacingLeft=8;fillColor=default;strokeColor=none;" value="TIMESTAMP" vertex="1">
<mxGeometry height="30" width="210" x="210" as="geometry" />
</mxCell>
<mxCell id="27" parent="20" style="swimlane;startSize=0;horizontal=0;fillColor=#f5f5f5;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="30" width="420" y="210" as="geometry" />
</mxCell>
<mxCell id="27a" parent="27" style="text;align=left;spacingLeft=8;fillColor=#f5f5f5;strokeColor=none;" value=" created_at" vertex="1">
<mxGeometry height="30" width="210" as="geometry" />
</mxCell>
<mxCell id="27b" parent="27" style="text;align=left;spacingLeft=8;fillColor=#f5f5f5;strokeColor=none;" value="TIMESTAMP NOT NULL" vertex="1">
<mxGeometry height="30" width="210" x="210" as="geometry" />
</mxCell>
<mxCell id="50" edge="1" parent="1" source="2" style="edgeStyle=entityRelationEdgeStyle;endArrow=ERmany;startArrow=ERone;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.35;entryDx=0;entryDy=0;strokeWidth=2;strokeColor=default;" target="20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="50lbl" connectable="0" parent="50" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;fontStyle=1;fontSize=14;" value="1" vertex="1">
<mxGeometry relative="0.1" as="geometry" />
</mxCell>
<mxCell id="50lbl2" connectable="0" parent="50" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;fontStyle=1;fontSize=14;" value="N" vertex="1">
<mxGeometry relative="0.9" as="geometry" />
</mxCell>
<mxCell id="60" parent="1" style="text;html=1;strokeColor=default;fillColor=default;align=left;verticalAlign=middle;spacingLeft=8;rounded=1;" value="β product_id is a logical foreign key referencing
the Product Service (external microservice).
No physical DB constraint enforced." vertex="1">
<mxGeometry height="60" width="380" x="60" y="450" as="geometry" />
</mxCell>
<mxCell id="61" parent="1" style="text;html=1;strokeColor=default;fillColor=default;align=left;verticalAlign=middle;spacingLeft=8;rounded=1;" value="π inventory_id is a real FK with ON DELETE CASCADE.
Reservations are always scoped to an inventory record." vertex="1">
<mxGeometry height="60" width="420" x="620" y="420" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="xh8uQWek8EmXh0WenLx9" name="Page-2">
<mxGraphModel dx="1406" dy="814" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
</root>
</mxGraphModel>
</diagram>
</mxfile>