diff options
| author | Wes Bos <wesbos@gmail.com> | 2017-10-27 13:24:41 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2017-10-27 13:24:41 -0400 |
| commit | 0f1b9240bbd05b377e868faf78b89b509a3d7537 (patch) | |
| tree | 1974b4d5a59f1843f64789b5536c32606a097ba0 /graphcool/types.graphql | |
| parent | acdfa2840f867e686471a8e9ac3f29353fab7dd1 (diff) | |
ayeee
Diffstat (limited to 'graphcool/types.graphql')
| -rw-r--r-- | graphcool/types.graphql | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/graphcool/types.graphql b/graphcool/types.graphql new file mode 100644 index 0000000..dcdd690 --- /dev/null +++ b/graphcool/types.graphql @@ -0,0 +1,56 @@ +# The following types define the data model of the example service +# based on which the GraphQL API is generated + +type File @model { + contentType: String! + createdAt: DateTime! + id: ID! @isUnique + item: Item @relation(name: "Photo") + name: String! + secret: String! @isUnique + size: Int! + updatedAt: DateTime! + url: String! @isUnique +} + +type Item @model { + createdAt: DateTime! + description: String! + fullPrice: Int + id: ID! @isUnique + image: File @relation(name: "Photo") + order: Order @relation(name: "OrderOnItem") + price: Int + title: String! + updatedAt: DateTime! + user: User @relation(name: "CartItems") +} + +type Order @model { + amount: Int + charge: String + createdAt: DateTime! + id: ID! @isUnique + item: Item @relation(name: "OrderOnItem") + token: String + updatedAt: DateTime! + user: User @relation(name: "OrderOnUser") +} + +type User @model { + createdAt: DateTime! + email: String @isUnique + id: ID! @isUnique + isVerified: Boolean! @defaultValue(value: false) + orders: [Order!]! @relation(name: "OrderOnUser") + password: String + secret: String @isUnique + updatedAt: DateTime! + auth0UserId: String @isUnique + name: String! + cart: [Item!]! @relation(name: "CartItems") + level: Int +} + + + |
