-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
mysql-schema.prisma
48 lines (42 loc) · 1.08 KB
/
mysql-schema.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
datasource db {
provider = "mysql"
url = env("database")
}
generator client {
provider = "python -m prisma"
interface = "asyncio"
recursive_type_depth = 5
}
model User {
// When creating a user ALWAYS pass a id, this does not have a default
id BigInt @id
createdAt DateTime @default(now())
discordId BigInt @default(0)
verifiedAt DateTime @default(now())
purchases Json
}
model Product {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
name String
description String
imageId String @default("")
price Int
productId Int
stock Int?
role BigInt?
attachments Json
// Tags will be refered to by ID, we would use connectors if we werent supporting open cloud
tags Json
purchases Int @default(0)
owners Int @default(0)
@@unique([name])
}
model Tag {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
name String
color Json
textColor Json
@@unique([name])
}