Include Profile log in renamed penalty model -> Audit log

This commit is contained in:
PxlLoewe
2026-01-21 19:38:55 +01:00
parent bc61144258
commit bdc35ea6b3
7 changed files with 55 additions and 17 deletions

View File

@@ -1,11 +1,12 @@
model Penalty {
model AuditLog {
id Int @id @default(autoincrement())
userId String
createdUserId String?
reportId Int?
type PenaltyType
reason String
// Generalized action type to cover penalties and user history events
action AuditLogAction?
reason String?
until DateTime?
suspended Boolean @default(false)
@@ -18,9 +19,13 @@ model Penalty {
Report Report? @relation(fields: [reportId], references: [id])
}
enum PenaltyType {
enum AuditLogAction {
// Penalty actions
KICK
TIME_BAN
PERMISSIONS_REVOCED
BAN
// User history events
USER_DELETED
USER_PROFILE_UPDATED
}