From fa3ec3299b3fa33e5a699683beb96cfa4e6dd51d Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Tue, 13 Feb 2018 13:19:23 -0500 Subject: getting there --- backend/database/datamodel.graphql | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'backend/database/datamodel.graphql') 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 -- cgit v1.3