Merge branch 'Enhanced-Audit-log-for-user-Profiles' of https://github.com/VAR-Virtual-Air-Rescue/var-monorepo into Enhanced-Audit-log-for-user-Profiles
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user