diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-02-13 13:19:23 -0500 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-02-13 13:19:23 -0500 |
| commit | fa3ec3299b3fa33e5a699683beb96cfa4e6dd51d (patch) | |
| tree | 601b4ff9650cd17a6d4181fc5982b401411d2a6a /backend/database/datamodel.graphql | |
| parent | e0d0baa75ec0bf617f91b6cd779305d4009cae12 (diff) | |
getting there
Diffstat (limited to 'backend/database/datamodel.graphql')
| -rw-r--r-- | backend/database/datamodel.graphql | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/backend/database/datamodel.graphql b/backend/database/datamodel.graphql index 4620206..ed70892 100644 --- a/backend/database/datamodel.graphql +++ b/backend/database/datamodel.graphql @@ -14,6 +14,7 @@ type User { password: String! name: String! posts: [Post!]! + orders: [Order!]! website: String age: Int resetToken: String @@ -24,12 +25,22 @@ type User { type CartItem { id: ID! @unique quantity: Int! @default(value: 1) - item: Item! + item: Item! # Relationship to an Item + user: User! # Relationship to a user } type Item { id: ID! @unique title: String! description: String! + image: String price: Int! } + +type Order { + id: ID! @unique + items: [Item!]! + total: Int! + user: User! + charge: String! +}
\ No newline at end of file |
