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

Annotation of /branches/5.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: 5622 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     permission_roles PermissionRole[]
82     level Int?
83     createdAt DateTime @default(now())
84     updatedAt DateTime @default(now()) @updatedAt
85    
86     @@map("snippets")
87     }
88    
89     model ChannelLock {
90     id Int @id @default(autoincrement())
91     guild_id String
92     channel_id String
93     permissions Json
94     createdAt DateTime @default(now())
95     updatedAt DateTime @default(now()) @updatedAt
96    
97     @@map("channel_locks")
98     }
99    
100     model PermissionRole {
101     id Int @id @default(autoincrement())
102     name String
103     guild_id String
104     roles String[] @default([])
105     users String[] @default([])
106     grantedPermissions String[] @default([])
107     level Int?
108     createdAt DateTime @default(now())
109     updatedAt DateTime @default(now()) @updatedAt
110     snippet Snippet? @relation(fields: [snippetId], references: [id])
111     snippetId Int?
112    
113     @@map("permission_roles")
114     }
115    
116     model ReactionRole {
117     id Int @id @default(autoincrement())
118     emoji String
119     isBuiltInEmoji Boolean
120     guildId String
121     channelId String
122     messageId String
123     roles String[]
124     requiredRoles String[] @default([])
125     blacklistedUsers String[] @default([])
126     requiredPermissions String[] @default([])
127     level Int?
128     single Boolean @default(false)
129     createdAt DateTime @default(now())
130     updatedAt DateTime @default(now()) @updatedAt
131    
132     @@map("reaction_roles")
133     }
134    
135     model User {
136     id Int @id @default(autoincrement())
137     name String?
138     username String
139     discordId String
140     guilds String[] @default([])
141     password String
142     token String?
143     createdAt DateTime @default(now())
144     tokenExpiresAt DateTime?
145     updatedAt DateTime @default(now()) @updatedAt
146    
147     @@map("users")
148     }
149    
150     model BoostRoleEntries {
151     id Int @id @default(autoincrement())
152     role_id String
153     user_id String
154     guild_id String
155     createdAt DateTime @default(now())
156    
157     @@map("boost_role_entries")
158     }
159    
160     model AfkEntry {
161     id Int @id @default(autoincrement())
162     reason String?
163     userId String
164     guildId String
165     mentions String[] @default([])
166     createdAt DateTime @default(now())
167     updatedAt DateTime @default(now()) @updatedAt
168    
169     @@map("afk_entries")
170     }
171    
172     enum PermissionLogicMode {
173     OR
174     AND
175     }
176    
177     model CommandPermissionOverwrites {
178     id Int @id @default(autoincrement())
179     guildId String
180     commands String[]
181     requiredPermissions String[] @default([])
182     requiredPermissionMode PermissionLogicMode @default(AND)
183     mode PermissionLogicMode @default(AND)
184     requiredRoles String[] @default([])
185     requiredUsers String[] @default([])
186     requiredChannels String[] @default([])
187     requiredLevel Int?
188     createdAt DateTime @default(now())
189     updatedAt DateTime @default(now()) @updatedAt
190    
191     @@map("command_permission_overwrites")
192     }
193    
194     model Ballot {
195     id Int @id @default(autoincrement())
196     guildId String
197     channelId String
198     messageId String
199     userId String
200     content String
201     anonymous Boolean @default(false)
202     files String[] @default([])
203     upvotes String[] @default([])
204     downvotes String[] @default([])
205     createdAt DateTime @default(now())
206     updatedAt DateTime @default(now()) @updatedAt
207    
208     @@map("ballots")
209     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26