model History {
id String @id @default(auto()) @map("_id") @db.ObjectId
actionType HistoryActionType
ipAddress String
hardwareId String?
user User @relation(fields: [userId], references: [id])
userId String @db.ObjectId
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([userId, ipAddress, hardwareId, createdAt])
@@index([actionType, createdAt])
}
model History {
id String @id @default(auto()) @map("_id") @db.ObjectId
actionType HistoryActionType
ipAddress String
hardwareId String?
user User @relation(fields: [userId], references: [id])
userId String @db.ObjectId
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([userId, ipAddress, hardwareId, createdAt])
@@index([actionType, createdAt])
}