/[sudobot]/branches/8.x/prisma/schema.prisma
ViewVC logotype

Annotation of /branches/8.x/prisma/schema.prisma

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (hide annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months ago) by rakinar2
File size: 7765 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
1 rakinar2 577 generator client {
2     provider = "prisma-client-js"
3     }
4    
5     datasource db {
6     provider = "postgresql"
7     url = env("DB_URL")
8     }
9    
10     enum InfractionType {
11     BAN
12     KICK
13     MUTE
14     WARNING
15     MASSBAN
16     TEMPBAN
17     SOFTBAN
18     MASSKICK
19     UNBAN
20     UNMUTE
21     BULK_DELETE_MESSAGE
22     TIMEOUT
23     TIMEOUT_REMOVE
24     BEAN
25     NOTE
26     }
27    
28     model Infraction {
29     id Int @id @default(autoincrement())
30     type InfractionType
31     userId String
32     guildId String
33     reason String?
34     moderatorId String
35     expiresAt DateTime?
36     metadata Json?
37     createdAt DateTime @default(now())
38     updatedAt DateTime @default(now()) @updatedAt
39     queueId Int?
40    
41     @@map("infractions")
42     }
43    
44     model SpamRecord {
45     id Int @id @default(autoincrement())
46     user_id String
47     guild_id String
48     level Int @default(1)
49     createdAt DateTime @default(now())
50     updatedAt DateTime @default(now()) @updatedAt
51    
52     @@map("spam_records")
53     }
54    
55     model Queue {
56     id Int @id @default(autoincrement())
57     user_id String
58     guild_id String
59     channel_id String?
60     message_id String?
61     file_name String
62     name String
63     args String[] @default([])
64     createdAt DateTime @default(now())
65     willRunAt DateTime
66    
67     @@map("queues")
68     }
69    
70     model Snippet {
71     id Int @id @default(autoincrement())
72     name String
73     user_id String
74     guild_id String
75     roles String[] @default([])
76     channels String[] @default([])
77     users String[] @default([])
78     attachments String[] @default([])
79     content String[] @default([])
80     randomize Boolean @default(false)
81     permissions String[] @default([])
82     permissionMode PermissionLogicMode @default(AND)
83     level Int?
84     createdAt DateTime @default(now())
85     updatedAt DateTime @default(now()) @updatedAt
86    
87     @@map("snippets")
88     }
89    
90     model ChannelLock {
91     id Int @id @default(autoincrement())
92     guild_id String
93     channel_id String
94     permissions Json
95     createdAt DateTime @default(now())
96     updatedAt DateTime @default(now()) @updatedAt
97    
98     @@map("channel_locks")
99     }
100    
101     model PermissionOverwrite {
102     id Int @id @default(autoincrement())
103     name String?
104     guildId String
105     roles String[] @default([])
106     users String[] @default([])
107     grantedPermissions String[] @default([])
108     createdAt DateTime @default(now())
109     updatedAt DateTime @default(now()) @updatedAt
110    
111     @@map("permission_overwrites")
112     }
113    
114     model ReactionRole {
115     id Int @id @default(autoincrement())
116     emoji String
117     isBuiltInEmoji Boolean
118     guildId String
119     channelId String
120     messageId String
121     roles String[]
122     requiredRoles String[] @default([])
123     blacklistedUsers String[] @default([])
124     requiredPermissions String[] @default([])
125     level Int?
126     single Boolean @default(false)
127     createdAt DateTime @default(now())
128     updatedAt DateTime @default(now()) @updatedAt
129    
130     @@map("reaction_roles")
131     }
132    
133     model User {
134     id Int @id @default(autoincrement())
135     name String?
136     username String
137     discordId String
138     guilds String[] @default([])
139     password String
140     token String?
141     recoveryToken String?
142     recoveryCode String?
143     recoveryAttempts Int @default(0)
144     recoveryTokenExpiresAt DateTime?
145     createdAt DateTime @default(now())
146     tokenExpiresAt DateTime?
147     updatedAt DateTime @default(now()) @updatedAt
148    
149     @@map("users")
150     }
151    
152     model BoostRoleEntries {
153     id Int @id @default(autoincrement())
154     role_id String
155     user_id String
156     guild_id String
157     createdAt DateTime @default(now())
158    
159     @@map("boost_role_entries")
160     }
161    
162     model AfkEntry {
163     id Int @id @default(autoincrement())
164     reason String?
165     userId String
166     guildId String
167     mentions String[] @default([])
168     global Boolean @default(false)
169     createdAt DateTime @default(now())
170     updatedAt DateTime @default(now()) @updatedAt
171    
172     @@map("afk_entries")
173     }
174    
175     enum PermissionLogicMode {
176     OR
177     AND
178     }
179    
180     model CommandPermissionOverwrite {
181     id Int @id @default(autoincrement())
182     guildId String
183     commands String[]
184     requiredPermissions String[] @default([])
185     requiredPermissionMode PermissionLogicMode @default(AND)
186     mode PermissionLogicMode @default(AND)
187     requiredRoles String[] @default([])
188     requiredUsers String[] @default([])
189     requiredChannels String[] @default([])
190     requiredLevel Int?
191     createdAt DateTime @default(now())
192     updatedAt DateTime @default(now()) @updatedAt
193    
194     @@map("command_permission_overwrites")
195     }
196    
197     model Ballot {
198     id Int @id @default(autoincrement())
199     guildId String
200     channelId String
201     messageId String
202     userId String
203     content String
204     anonymous Boolean @default(false)
205     files String[] @default([])
206     upvotes String[] @default([])
207     downvotes String[] @default([])
208     createdAt DateTime @default(now())
209     updatedAt DateTime @default(now()) @updatedAt
210    
211     @@map("ballots")
212     }
213    
214     model PermissionLevel {
215     id Int @id @default(autoincrement())
216     guildId String
217     level Int
218     disabled Boolean @default(false)
219     grantedPermissions String[] @default([])
220     roles String[] @default([])
221     users String[] @default([])
222     createdAt DateTime @default(now())
223     updatedAt DateTime @default(now()) @updatedAt
224    
225     @@map("permission_levels")
226     }
227    
228     model Review {
229     id Int @id @default(autoincrement())
230     reviewer String?
231     content String
232     rating Int
233     discordId String?
234     email String?
235     aboutReviewer String?
236     approved Boolean @default(false)
237     ip String?
238     createdAt DateTime @default(now())
239     updatedAt DateTime @default(now()) @updatedAt
240    
241     @@map("reviews")
242     }
243    
244     model VerificationEntry {
245     id Int @id @default(autoincrement())
246     userId String
247     token String @unique
248     guildId String
249     attempts Int @default(0)
250     meta Json?
251     createdAt DateTime @default(now())
252     updatedAt DateTime @default(now()) @updatedAt
253    
254     @@map("verification_entries")
255     }
256    
257     model GlobalUserBan {
258     id Int @id @default(autoincrement())
259     userId String @unique
260     reason String?
261     executorId String
262     notified Boolean @default(false)
263     createdAt DateTime @default(now())
264     updatedAt DateTime @default(now()) @updatedAt
265    
266     @@map("global_user_bans")
267     }
268    
269     model UserStatistics {
270     id Int @id @default(autoincrement())
271     userId String
272     guildId String
273     messagesSent Int @default(0)
274     messagesEdited Int @default(0)
275     messagesDeleted Int @default(0)
276     createdAt DateTime @default(now())
277     updatedAt DateTime @default(now()) @updatedAt
278    
279     @@map("user_statistics")
280     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26