File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,3 +15,44 @@ npm run prisma generate
1515npm run prisma:reset # reset and reseed the db for dev before starting the dev server
1616npm run start:dev
1717```
18+
19+ ## Entity Relationship Diagram
20+
21+ To view the diagram, install the ` bierner.markdown-mermaid ` extension in VS Code.
22+
23+ ``` mermaid
24+ erDiagram
25+ direction RL
26+ User ||--o{ ORDER : creates
27+ ORDER ||--}| ORDER_ITEM : contains
28+ PRODUCT ||--o{ ORDER_ITEM : reference
29+ User {
30+ string id PK "UUID"
31+ string name
32+ string email UK
33+ string password "hash"
34+ string createdAt "Timestamp w Zone"
35+ }
36+ ORDER {
37+ string id PK "UUID"
38+ string idUser FK
39+ date createdAt "Timestamp w Zone"
40+ string status "Created, Ordered, Canceled, Done"
41+ }
42+ PRODUCT {
43+ string id PK "UUID"
44+ string name
45+ string size "nullable"
46+ string description "nullable"
47+ date createdAt "Timestamp w Zone"
48+ }
49+ ORDER_ITEM {
50+ string id PK "UUID"
51+ string idProduct FK "UUID from PRODUCT"
52+ string idOrder FK "UUID from ORDER"
53+ string name "name from PRODUCT"
54+ string size "size from PRODUCT | nullable"
55+ string description "description from PRODUCT | nullable"
56+ int quantity
57+ }
58+ ```
You can’t perform that action at this time.
0 commit comments