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
// The user’s global nickname, taking precedence over the username in display.
32
-
global_nameString?
33
-
// Returns the user’s display name. For regular users this is just their global name or their username, but if they have a guild specific nickname then that is returned instead.
34
-
display_nameString
35
-
// Returns a string that allows you to mention the given user.
36
-
mentionString
37
-
// Specifies if the user is a bot account.
38
-
botBoolean@default(false)
39
-
// Returns the user’s creation time in UTC. This is when the user’s Discord account was created.
40
-
created_atDateTime?
41
-
// True if user is a member of a guild (not a discord.py attribute)
42
-
is_memberBoolean@default(true)
43
-
// The guild specific nickname of the user. Takes precedence over the global name.
44
-
nickString?
45
-
// An aware datetime object that specifies the date and time in UTC that the member joined the guild. If the member left and rejoined the guild, this will be the latest date. In certain cases, this can be None.
46
-
joined_atDateTime?
27
+
modelGuild {
28
+
guild_idBigInt@id
29
+
guild_joined_atDateTime?@default(now())
30
+
casesCase[]
31
+
snippetsSnippet[]
32
+
notesNote[]
33
+
remindersReminder[]
47
34
48
-
// This is a relation field and is a list of roles that the user has, linking to the `UserRoles` table. If you fetch a user from the database and include this field, you will get all the roles associated with that user.
49
-
rolesUserRoles[]
50
-
51
-
// This represents all the infractions that this user has given out when acting as a moderator. It has a `relation` annotation to make clear that for these infractions, this user is referred to in the `moderator` field of the `Infractions` table.
// This is all the infractions that this user has received. It has a `relation` annotation to make clear that for these infractions, this user is referred to in the `user` field of the `Infractions` table.
// Indicates if the role will be displayed separately from other members.
76
-
hoistBoolean@default(false)
77
-
// Indicates if the role is managed by the guild through some form of integrations such as Twitch.
78
-
managedBoolean@default(false)
79
-
// Indicates if the role is mentionable.
80
-
mentionableBoolean@default(false)
81
-
// The role’s creation time in UTC.
82
-
created_atDateTime?
83
-
// Returns a string that allows you to mention a role.
84
-
mentionString?@default("")
85
-
// The role’s color. An integer representation of hexadecimal colour code.
86
-
colorBigInt?
87
-
88
-
// 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.
89
-
usersUserRoles[]
90
-
91
-
// This is a Boolean field indicating if the role is a moderator role. This is not an attribute coming from Discord but an extra field you have defined to distinguish normal roles from moderator roles. It defaults to false, meaning if you don't specify it when creating a new role, it will be assumed to be a non-moderator role.
// 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.
// The server ID of the guild where the snippet was created
130
-
// 0 is the default value for this field for migration purposes
131
-
server_idBigInt@default(0)
132
-
133
-
// 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.
// 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.
// 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.
// 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