-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
63 lines (55 loc) · 1.69 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
datasource db {
provider = "sqlite"
url = "file:dataBase.db"
}
generator db {
provider = "prisma-client-py"
interface = "asyncio"
recursive_type_depth = 5
}
model file {
id Int @id @default(autoincrement())
user_id Int @default(-1)
group_id BigInt @default(-1)
created_date String @default("")
url String @default("")
filename String @default("")
craeted_at Float @default(0)
last_watched Float @default(0)
key String @default("")
type String @default("")
ext String @default("")
size Int @default(0)
user_filename String @default("")
uses_number Int @default(0)
max_uses Int @default(0)
}
model User {
id Int @id @default(autoincrement())
username String @default("")
password String @default("")
discord_uid BigInt @default(-1)
tokens Token[]
groups Group[]
}
model Token{
id Int @id @default(autoincrement())
accessToken String @default("")
fingerprint String @default("None")
user User @relation(fields: [user_id], references: [id])
user_id Int @default(0)
}
model Group{
id Int @id @default(autoincrement())
name String @default("")
group_id BigInt @default(0)
admin_id Int @default(0)
members User[]
invitements Invitements[]
}
model Invitements{
id Int @id @default(autoincrement())
data String @default("")
group Group @relation(fields: [group_id], references: [id], onDelete: Cascade)
group_id Int @default(0)
}