diff options
| author | Randy Ridge <randyridge@gmail.com> | 2018-09-14 20:01:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-14 20:01:25 -0400 |
| commit | 908180c77cd38011eeedcae949613da2a3391e5e (patch) | |
| tree | b59bf1aae819a04d453cde72f6e601f5561a740f /finished-application/backend/prisma/datamodel.graphql | |
| parent | 1f6667d233a4a2e9df977204d83a8f749c050c75 (diff) | |
| parent | b3bebda57ba187b7fa10398054b54c05d3fd3555 (diff) | |
Merge branch 'master' into randyridge/our
Diffstat (limited to 'finished-application/backend/prisma/datamodel.graphql')
| -rw-r--r-- | finished-application/backend/prisma/datamodel.graphql | 67 |
1 files changed, 1 insertions, 66 deletions
diff --git a/finished-application/backend/prisma/datamodel.graphql b/finished-application/backend/prisma/datamodel.graphql index d652dc4..e95965d 100644 --- a/finished-application/backend/prisma/datamodel.graphql +++ b/finished-application/backend/prisma/datamodel.graphql @@ -1,66 +1 @@ -enum Permission { - ADMIN - USER - ITEMCREATE - ITEMUPDATE - ITEMDELETE - PERMISSIONUPDATE -} - -type User { - id: ID! @unique - email: String! @unique - password: String! - name: String! - orders: [Order!]! - resetToken: String - resetTokenExpiry: String - cart: [CartItem!]! - createdAt: DateTime! - updatedAt: DateTime! - permissions: [Permission!]! -} - -type CartItem { - id: ID! @unique - quantity: Int! @default(value: 1) - item: Item # Relationship to an Item - user: User! # Relationship to a user - createdAt: DateTime! - updatedAt: DateTime! -} - -type Item { - id: ID! @unique - title: String! - description: String! - image: String - largeImage: String - price: Int! - createdAt: DateTime! - updatedAt: DateTime! - user: User! # Relationship to a user -} - -type OrderItem { - id: ID! @unique - title: String! - description: String! - image: String - largeImage: String - price: Int! - createdAt: DateTime! - updatedAt: DateTime! - quantity: Int! @default(value: 1) - user: User -} - -type Order { - id: ID! @unique - items: [OrderItem!]! - total: Int! - user: User! - createdAt: DateTime! - updatedAt: DateTime! - charge: String! -} +# Here we will write the datamodel! |
