[deploy] add register module backend
Some checks failed
Deploy Discord Bot / deploy (push) Failing after 20s
Some checks failed
Deploy Discord Bot / deploy (push) Failing after 20s
This commit is contained in:
@@ -26,6 +26,8 @@ model GuildSettings {
|
||||
reactionRolesEnabled Boolean?
|
||||
reactionRolesConfig Json?
|
||||
eventsEnabled Boolean?
|
||||
registerEnabled Boolean?
|
||||
registerConfig Json?
|
||||
supportRoleId String?
|
||||
updatedAt DateTime @updatedAt
|
||||
createdAt DateTime @default(now())
|
||||
@@ -160,3 +162,54 @@ model EventSignup {
|
||||
@@unique([eventId, userId])
|
||||
@@index([guildId, eventId])
|
||||
}
|
||||
|
||||
model RegisterForm {
|
||||
id String @id @default(cuid())
|
||||
guildId String
|
||||
name String
|
||||
description String?
|
||||
reviewChannelId String?
|
||||
notifyRoleIds String[]
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
fields RegisterFormField[]
|
||||
|
||||
@@index([guildId, isActive])
|
||||
}
|
||||
|
||||
model RegisterFormField {
|
||||
id String @id @default(cuid())
|
||||
formId String
|
||||
label String
|
||||
type String
|
||||
required Boolean @default(false)
|
||||
"order" Int @default(0)
|
||||
|
||||
form RegisterForm @relation(fields: [formId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model RegisterApplication {
|
||||
id String @id @default(cuid())
|
||||
guildId String
|
||||
userId String
|
||||
formId String
|
||||
status String @default("pending")
|
||||
reviewedBy String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
answers RegisterApplicationAnswer[]
|
||||
|
||||
form RegisterForm @relation(fields: [formId], references: [id])
|
||||
|
||||
@@index([guildId, formId, status])
|
||||
}
|
||||
|
||||
model RegisterApplicationAnswer {
|
||||
id String @id @default(cuid())
|
||||
applicationId String
|
||||
fieldId String
|
||||
value String
|
||||
|
||||
application RegisterApplication @relation(fields: [applicationId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user