24 lines
470 B
Plaintext
24 lines
470 B
Plaintext
model Log {
|
|
id Int @id @default(autoincrement())
|
|
type LOG_TYPE
|
|
userId String?
|
|
browser String?
|
|
deviceId String?
|
|
ip String?
|
|
field String?
|
|
oldValue String?
|
|
newValue String?
|
|
timestamp DateTime @default(now())
|
|
|
|
User User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@map(name: "logs")
|
|
}
|
|
|
|
enum LOG_TYPE {
|
|
LOGIN
|
|
PROFILE_CHANGE
|
|
REGISTER
|
|
ACCOUNT_DELETED
|
|
}
|