add log for sign in, sign out, change password, remove upload file

This commit is contained in:
2026-01-09 19:38:54 +07:00
parent 427a1040cf
commit ae39cc111f
32 changed files with 1991 additions and 212 deletions

View File

@@ -18,6 +18,7 @@ model User {
updatedAt DateTime @updatedAt
sessions Session[]
accounts Account[]
audit Audit[]
role String?
banned Boolean? @default(false)
@@ -142,3 +143,18 @@ model Setting {
@@map("setting")
}
model Audit {
id String @id @default(uuid())
userId String
action String
tableName String
recordId String
oldValue String?
newValue String?
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("audit")
}