summaryrefslogtreecommitdiffstats
path: root/backend/database/datamodel.graphql
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-01-30 12:41:01 -0500
committerWes Bos <wesbos@gmail.com>2018-01-30 12:41:01 -0500
commitcd0b07b3adb36fb5ec098f9e511ab45d774fee7b (patch)
treea203e5010219ccea1acc6bbd2c0a4bcfa0a78615 /backend/database/datamodel.graphql
parent0a1648bf47490b312169c531aeb51ef4725e8d2e (diff)
Move to Prisma Backend
Diffstat (limited to 'backend/database/datamodel.graphql')
-rw-r--r--backend/database/datamodel.graphql26
1 files changed, 26 insertions, 0 deletions
diff --git a/backend/database/datamodel.graphql b/backend/database/datamodel.graphql
new file mode 100644
index 0000000..605e242
--- /dev/null
+++ b/backend/database/datamodel.graphql
@@ -0,0 +1,26 @@
+type Post {
+ id: ID! @unique
+ createdAt: DateTime!
+ updatedAt: DateTime!
+ isPublished: Boolean! @default(value: "false")
+ title: String!
+ text: String!
+ author: User!
+}
+
+type User {
+ id: ID! @unique
+ email: String! @unique
+ password: String!
+ name: String!
+ posts: [Post!]!
+ website: String
+ age: Int
+}
+
+type Item {
+ id: ID! @unique
+ title: String!
+ description: String!
+ price: Int!
+}