-
Notifications
You must be signed in to change notification settings - Fork 252
/
Copy pathschema.prisma
91 lines (80 loc) · 1.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model Group {
id String @id @default(auto()) @map("_id") @db.ObjectId
groupId String @unique
subject String
size Int
creation Int
owner String?
desc String?
joinApprovalMode Boolean? @default(false)
restrict Boolean
announce Boolean
isCommunity Boolean
isCommunityAnnounce Boolean
memberAddMode Boolean
participants Participant[]
ephemeralDuration Int? @default(0)
settings Settings
}
type Settings {
notify Boolean @default(false)
welcome Boolean @default(true)
leave Boolean @default(true)
mute Boolean @default(false)
antilink Antilink
antibot Boolean @default(false)
antiviewonce Boolean @default(false)
banned String[]
}
type Participant {
id String?
admin String?
}
model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
userId String @unique
name String?
limit Int
role Role @default(free)
expired Int @default(0)
afk Afk
}
type Afk {
status Boolean @default(false)
reason String?
since Int? @default(0)
}
enum Role {
free
premium
}
type Antilink {
status Boolean? @default(false)
mode Mode @default(kick)
list AntilinkList[] @default([whatsapp])
}
enum Mode {
kick
delete
}
enum AntilinkList {
youtube
instagram
facebook
whatsapp
twitter
tiktok
all
}
model Session {
id String @id @default(auto()) @map("_id") @db.ObjectId
sessionId String @unique
session String?
}