mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:34:13 +02:00
feat(database): add restrict, ban, tempban and more roles
This commit is contained in:
parent
7a872b0f1a
commit
5fd19e8909
3
.gitignore
vendored
3
.gitignore
vendored
@ -105,3 +105,6 @@ dist
|
||||
|
||||
# IntelliJ IDEA
|
||||
/.idea/
|
||||
|
||||
# Prisma migration files
|
||||
/prisma/migrations/
|
||||
|
@ -10,7 +10,46 @@ datasource db {
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model user {
|
||||
id Int @id
|
||||
model User {
|
||||
id String @id @db.VarChar(255)
|
||||
level Int @default(0)
|
||||
xp Int @default(0)
|
||||
balance Int @default(0)
|
||||
lastDaily DateTime
|
||||
vegan Boolean @default(false)
|
||||
activist Boolean @default(false)
|
||||
trusted Boolean @default(false)
|
||||
plus Boolean @default(false)
|
||||
muted Boolean @default(false)
|
||||
Restrict Restrict[]
|
||||
Ban Ban[]
|
||||
TempBan TempBan[]
|
||||
}
|
||||
|
||||
model Restrict {
|
||||
id Int @id @default(autoincrement())
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId String
|
||||
startTime DateTime @default(now())
|
||||
endedTime DateTime?
|
||||
reason String
|
||||
}
|
||||
|
||||
model Ban {
|
||||
id Int @id @default(autoincrement())
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId String
|
||||
time DateTime @default(now())
|
||||
active Boolean @default(true)
|
||||
reason String
|
||||
}
|
||||
|
||||
model TempBan {
|
||||
id Int @id @default(autoincrement())
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId String
|
||||
startTime DateTime @default(now())
|
||||
endedTime DateTime
|
||||
active Boolean @default(true)
|
||||
reason String
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user