You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(schema.prisma): refactor schema to improve readability and remove unused models
feat(schema.prisma): add new models for Settings, Notes, and Reminders to support new features
fix(main.py): move database connection after starting coroutines to ensure they are started before connecting to the database
feat(main.py): add log message for closing database connection to improve debugging
// Indicates if the role will be displayed separately from other members.
62
-
hoistBoolean
82
+
hoistBoolean@default(false)
63
83
// Indicates if the role is managed by the guild through some form of integrations such as Twitch.
64
-
managedBoolean@default(false)
84
+
managedBoolean@default(false)
65
85
// Indicates if the role is mentionable.
66
-
mentionableBoolean@default(false)
86
+
mentionableBoolean@default(false)
67
87
// The role’s creation time in UTC.
68
-
created_atDateTime
88
+
created_atDateTime?
69
89
// Returns a string that allows you to mention a role.
70
-
mentionString@default("")
90
+
mentionString?@default("")
71
91
72
92
// This field links a role to the users that have it. It references the `UserRoles` junction table. If you fetch a role from the database and include this field, you will get a list of UserRoles entries and from there you can find all the users that have this role.
73
93
usersUserRoles[]
@@ -106,8 +126,8 @@ model Infractions {
106
126
expires_atDateTime?
107
127
108
128
// These fields establish a relationship with the `Users` model. `moderator_id` is the ID of the user who gave the infraction. The line `moderator Users? @relation("Moderator", fields: [moderator_id], references: [id])` links to the `Users` model, indicating that an instance of `Users` (the moderator) is associated with this infraction.
// These fields establish another relationship with the `Users` model. `user_id` is the ID of the user who received the infraction. The line `user Users @relation("User", fields: [user_id], references: [id])` links to the `Users` model, indicating that an instance of `Users` (the user who received the infraction) is associated with this infraction.
// // Link to infractions associated with this user
147
-
// infractions infractions[]
148
-
// //
149
-
// }
150
-
151
-
// // Table representing roles in the system
152
-
// model roles {
153
-
// // Role identifier
154
-
// role_id BigInt @id
155
-
// // Name of the role
156
-
// role_name String
157
-
// // Link to users associated with this role
158
-
// user_roles user_roles[]
159
-
// // Link to moderators associated with this role
160
-
// moderators moderators[]
161
-
// }
162
-
163
-
// // General settings for the system
164
-
// model settings {
165
-
// // Key of the setting
166
-
// setting_key String @id
167
-
// // Value of the setting
168
-
// setting_value String
169
-
// // Optional description of what the setting does
170
-
// setting_description String?
171
-
// }
172
-
173
-
// // Table representing moderators in the system
174
-
// model moderators {
175
-
// // Moderator identifier (Discord ID)
176
-
// moderator_id BigInt @id
177
-
// // Associated role identifier
178
-
// role_id BigInt?
179
-
// // Link to role associated with this moderator
180
-
// role roles? @relation(fields: [role_id], references: [role_id])
181
-
// // Link to notes created by this moderator
182
-
// notes notes[]
183
-
// // Link to infractions created by this moderator
184
-
// infractions infractions[]
185
-
// }
186
144
187
-
// // Table for storing logs
188
-
// model logs {
189
-
// // Unique log identifier
190
-
// log_id String @id @default(uuid())
191
-
// // Timestamp when log was created
192
-
// log_created_at DateTime @default(now())
193
-
// // Level of the log
194
-
// log_level String?
195
-
// // Content/text of the log
196
-
// log_content String?
197
-
// }
145
+
// This field establishes a relationship with the `Users` model. `author_id` is the ID of the user who created the snippet. The line `author Users @relation(fields: [author_id], references: [id])` links to the `Users` model, indicating that an instance of `Users` (the author) is associated with this snippet.
// // Composite primary key consisting of user_id and role_id
211
-
// @@id([user_id, role_id])
212
-
// }
155
+
// These fields establish a relationship with the `Users` model. `moderator_id` is the ID of the user who created the note. The line `moderator Users? @relation("Moderator", fields: [moderator_id], references: [id])` links to the `Users` model, indicating that an instance of `Users` (the moderator) is associated with this note.
// // Table for storing notes/moderator reports on users
215
-
// model notes {
216
-
// // Unique identifier for the note
217
-
// note_id String @id @default(uuid())
218
-
// // Content of the note
219
-
// note_content String
220
-
// // Moderator who created the note
221
-
// moderator_id BigInt?
222
-
// // User who the note is about
223
-
// user_id BigInt?
224
-
// // When the note was created
225
-
// note_created_at DateTime @default(now())
226
-
// // Link to the moderator
227
-
// moderator moderators? @relation(fields: [moderator_id], references: [moderator_id])
228
-
// // Link to the user
229
-
// user users? @relation(fields: [user_id], references: [user_id])
230
-
// }
159
+
// These fields establish another relationship with the `Users` model. `user_id` is the ID of the user who the note is about. The line `user Users @relation("User", fields: [user_id], references: [id])` links to the `Users` model, indicating that an instance of `Users` (the user who the note is about) is associated with this note.
// // Table for storing one-to-many snippets of text
233
-
// model snippets {
234
-
// // Name of the snippet
235
-
// snippet_name String @id
236
-
// // Content of the snippet
237
-
// snippet_content String
238
-
// }
164
+
modelReminders {
165
+
idBigInt@id
166
+
contentString
167
+
created_atDateTime@default(now())
168
+
expires_atDateTime
239
169
240
-
// // Table representing guilds/servers in the system
241
-
// model guilds {
242
-
// // Unique identifier for the guild (Discord ID)
243
-
// guild_id BigInt @id
244
-
// // Name of the guild
245
-
// guild_name String
246
-
// // ID of the owner of the guild
247
-
// guild_owner_id BigInt
248
-
// }
170
+
// These fields establish a relationship with the `Users` model. `author_id` is the ID of the user who created the reminder. The line `author Users @relation(fields: [author_id], references: [id])` links to the `Users` model, indicating that an instance of `Users` (the author) is associated with this reminder.
0 commit comments