diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-05-22 09:33:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-22 09:33:29 -0400 |
| commit | 176b6e1b0c2133a28e65953e1f710bc265b9c971 (patch) | |
| tree | 34e7560276d0b32aa09b406b6566415f67125c1d /backend/database | |
| parent | 51f593384f1325b78a263d0d870d162236ed28d2 (diff) | |
| parent | 6e617cbcb456bd0316392d53550e9b34de16001a (diff) | |
Merge pull request #6 from wesbos/prisma
WIP: Updated Prisma related setup/code
Diffstat (limited to 'backend/database')
| -rw-r--r-- | backend/database/datamodel.graphql | 67 | ||||
| -rw-r--r-- | backend/database/prisma.yml | 3 |
2 files changed, 0 insertions, 70 deletions
diff --git a/backend/database/datamodel.graphql b/backend/database/datamodel.graphql deleted file mode 100644 index 9465524..0000000 --- a/backend/database/datamodel.graphql +++ /dev/null @@ -1,67 +0,0 @@ -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) - item: Item! # Relationship to an Item - user: User! # Relationship to a user -} - -type Order { - id: ID! @unique - items: [OrderItem!]! - total: Int! - user: User! - createdAt: DateTime! - updatedAt: DateTime! - charge: String! -}
\ No newline at end of file diff --git a/backend/database/prisma.yml b/backend/database/prisma.yml deleted file mode 100644 index 8a11c08..0000000 --- a/backend/database/prisma.yml +++ /dev/null @@ -1,3 +0,0 @@ -endpoint: ${PRISMA_ENDPOINT} -datamodel: datamodel.graphql -secret: ${env:PRISMA_SECRET} |
