Enhanced audit log for user profiles #154

Merged
PxlLoewe merged 6 commits from Enhanced-Audit-log-for-user-Profiles into staging 2026-01-30 16:01:50 +00:00
Showing only changes of commit ea8d63ce0b - Show all commits

View File

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