fix and update
This commit is contained in:
@@ -64,6 +64,7 @@ model User {
|
||||
sessions Session[]
|
||||
devices Device[]
|
||||
signInEvents SignInEvent[]
|
||||
activityLogs UserActivityLog[]
|
||||
authCodes AuthCode[]
|
||||
linkedAccounts LinkedAccount[]
|
||||
userRoles UserRole[]
|
||||
@@ -171,6 +172,24 @@ model SignInEvent {
|
||||
@@index([userId, createdAt])
|
||||
}
|
||||
|
||||
model UserActivityLog {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
action String
|
||||
title String
|
||||
detail String?
|
||||
entityType String?
|
||||
entityId String?
|
||||
ipAddress String?
|
||||
userAgent String?
|
||||
actorId String?
|
||||
createdAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([userId, createdAt])
|
||||
@@index([userId, action])
|
||||
}
|
||||
|
||||
model LinkedAccount {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
|
||||
Reference in New Issue
Block a user