diff options
Diffstat (limited to 'backend/database')
| -rw-r--r-- | backend/database/datamodel.graphql | 21 | ||||
| -rw-r--r-- | backend/database/prisma.yml | 3 |
2 files changed, 12 insertions, 12 deletions
diff --git a/backend/database/datamodel.graphql b/backend/database/datamodel.graphql index f31a089..43ae403 100644 --- a/backend/database/datamodel.graphql +++ b/backend/database/datamodel.graphql @@ -1,11 +1,11 @@ -type Post { - id: ID! @unique - createdAt: DateTime! - updatedAt: DateTime! - isPublished: Boolean! @default(value: "false") - title: String! - text: String! - author: User! +enum Permission { + ADMIN + USER + ITEMCREATE + ITEMUPDATE + ITEMDELETE + PERMISSIONUPDATE + NUKE } type User { @@ -13,15 +13,13 @@ type User { email: String! @unique password: String! name: String! - posts: [Post!]! orders: [Order!]! - website: String - age: Int resetToken: String resetTokenExpiry: String cart: [CartItem!]! createdAt: DateTime! updatedAt: DateTime! + permissions: [Permission!]! } type CartItem { @@ -42,6 +40,7 @@ type Item { price: Int! createdAt: DateTime! updatedAt: DateTime! + user: User! # Relationship to a user } type OrderItem { diff --git a/backend/database/prisma.yml b/backend/database/prisma.yml index b01378b..b52f72b 100644 --- a/backend/database/prisma.yml +++ b/backend/database/prisma.yml @@ -16,5 +16,6 @@ datamodel: datamodel.graphql # import: seed.graphql # cluster: ${env:PRISMA_CLUSTER} -cluster: local +# cluster: local +# cluster: wesbos/prisma-us1
\ No newline at end of file |
