Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum Permission {
- ADMIN
- USER
- ITEMCREATE
- ITEMUPDATE
- ITEMDELETE
- PERMISSIONUPDATE
- }
- type User {
- id: ID! @unique
- name: String!
- email: String! @unique
- password: String!
- resetToken: String
- resetTokenExpiry: Float
- permissions: [Permission]
- cart: [CartItem!]!
- }
- type Item {
- id: ID! @unique
- title: String!
- description: String!
- image: String
- largeImage: String
- price: Int!
- user: User!
- category: Category!
- }
- type Category {
- id: ID! @unique
- name: String!
- body: String!
- user: User!
- # subCategory: [SubCategory]!
- # shop: Shop!
- }
- type CartItem {
- id: ID! @unique
- quantity: Int! @default(value: 1)
- item: Item # relationship to Item
- user: User! # relationship to User
- }
- type OrderItem {
- id: ID! @unique
- title: String!
- description: String!
- image: String!
- largeImage: String!
- price: Int!
- quantity: Int! @default(value: 1)
- user: User
- }
- type Order {
- id: ID! @unique
- items: [OrderItem!]!
- total: Int!
- user: User!
- charge: String!
- createdAt: DateTime!
- updatedAt: DateTime!
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement