-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
def5087
commit 88e03d6
Showing
15 changed files
with
13,392 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
projects: | ||
app: | ||
schemaPath: "src/schema.graphql" | ||
extensions: | ||
endpoints: | ||
default: "http://localhost:4444" | ||
prisma: | ||
schemaPath: "src/generated/prisma.graphql" | ||
extensions: | ||
prisma: prisma.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
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! | ||
} | ||
|
||
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! | ||
} |
Oops, something went wrong.