diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-08-17 15:51:02 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-08-17 15:51:02 -0400 |
| commit | c3bbebfcfeed7a9b8c7470d7b48e12046d834e59 (patch) | |
| tree | 05c50c931d0e709c640744387fbabe870658e9e7 /stepped-solutions/41/backend/datamodel.graphql | |
| parent | 124f227a8235e08bddf8376e0b3d01d33c4414f3 (diff) | |
suuuup everyone
Diffstat (limited to 'stepped-solutions/41/backend/datamodel.graphql')
| -rwxr-xr-x | stepped-solutions/41/backend/datamodel.graphql | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/stepped-solutions/41/backend/datamodel.graphql b/stepped-solutions/41/backend/datamodel.graphql new file mode 100755 index 0000000..9d7a8b4 --- /dev/null +++ b/stepped-solutions/41/backend/datamodel.graphql @@ -0,0 +1,37 @@ +enum Permission { + ADMIN + USER + ITEMCREATE + ITEMUPDATE + ITEMDELETE + PERMISSIONUPDATE +} + +type User { + id: ID! @unique + name: String! + email: String! @unique + password: String! + resetToken: String + resetTokenExpiry: String + permissions: [Permission] + cart: [CartItem!]! +} + +type Item { + id: ID! @unique + title: String! + description: String! + image: String + largeImage: String + price: Int! + user: User! +} + + +type CartItem { + id: ID! @unique + quantity: Int! @default(value: 1) + item: Item! # relationship to Item + user: User! # relationship to User +} |
