Remove unnecessary description and whitespace from nexumi.mdc file
This commit is contained in:
81
apps/bot/prisma/schema.prisma
Normal file
81
apps/bot/prisma/schema.prisma
Normal file
@@ -0,0 +1,81 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Guild {
|
||||
id String @id
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
settings GuildSettings?
|
||||
cases Case[]
|
||||
}
|
||||
|
||||
model GuildSettings {
|
||||
id String @id @default(cuid())
|
||||
guildId String @unique
|
||||
locale String @default("de")
|
||||
moderationEnabled Boolean @default(true)
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id
|
||||
createdAt DateTime @default(now())
|
||||
warnings Warning[]
|
||||
notes ModNote[]
|
||||
}
|
||||
|
||||
model Case {
|
||||
id String @id @default(cuid())
|
||||
caseNumber Int
|
||||
guildId String
|
||||
targetUserId String
|
||||
moderatorId String
|
||||
action String
|
||||
reason String?
|
||||
metadata Json?
|
||||
deletedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
warnings Warning[]
|
||||
moderationNote ModNote[]
|
||||
|
||||
@@unique([guildId, caseNumber])
|
||||
@@index([guildId, targetUserId])
|
||||
}
|
||||
|
||||
model Warning {
|
||||
id String @id @default(cuid())
|
||||
guildId String
|
||||
userId String
|
||||
moderatorId String
|
||||
reason String?
|
||||
caseId String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
case Case? @relation(fields: [caseId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([guildId, userId])
|
||||
}
|
||||
|
||||
model ModNote {
|
||||
id String @id @default(cuid())
|
||||
guildId String
|
||||
userId String
|
||||
moderatorId String
|
||||
note String
|
||||
caseId String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
case Case? @relation(fields: [caseId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([guildId, userId])
|
||||
}
|
||||
Reference in New Issue
Block a user