diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-02-28 15:28:15 -0500 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-02-28 15:28:15 -0500 |
| commit | f7bea2d1b7be2b70dceb25c9837f608b538e9cec (patch) | |
| tree | 3bac7ad6d76fe9eca1d97f92109d709a141bfc00 /backend/database/datamodel.graphql | |
| parent | 8f2c595eca30e2d7138c8e8d6685774a8f44e55d (diff) | |
what
Diffstat (limited to 'backend/database/datamodel.graphql')
| -rw-r--r-- | backend/database/datamodel.graphql | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/backend/database/datamodel.graphql b/backend/database/datamodel.graphql index 940fb6f..c4ac4f6 100644 --- a/backend/database/datamodel.graphql +++ b/backend/database/datamodel.graphql @@ -43,9 +43,22 @@ type Item { updatedAt: DateTime! } +type OrderItem { + id: ID! @unique + title: String! + description: String! + image: String + price: Int! + createdAt: DateTime! + updatedAt: DateTime! + quantity: Int! @default(value: 1) + item: Item! # Relationship to an Item + user: User! # Relationship to a user +} + type Order { id: ID! @unique - items: [Item!]! + items: [OrderItem!]! total: Int! user: User! createdAt: DateTime! |
