E-Commerce ERDs
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

View only
 
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Items (make up the fixed catalog, don't belong to users)
2
idunique id / primary key
3
namestring
5
pricenumber (integer in USD cents)
9
10
Orders (belong to one user, reference many items)
11
idunique id / primary key
12
owned_bystring that is a REFERENCE to a user id
13
itemsarray of objects that each look like this:
14
{
15
item: REFERENCE string "populate" (v subdocuments)
16
qty: integermake sure you fix in time the price you ended up paying
17
unit_price: VIRTUAL pulling from the price field on the
18
referenced item (integer in USD cents)
19
}
20
total VIRTUAL integer in USD centsNote: Stripe requires amount to be in cents
21
obtained by looping through the objects in items array and
22
calculating unit_price x quantity for each and adding up
23
the qty x unit price of each
24
checkoutCompleteboolean (defaults to false)
45
46
47
48
49
Users (have many orders, which in turn reference many items)
50
idunique id / primary key
51
emailstring
52
passwordstring
53
orders
array of strings which are references keys to orders
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
Loading...