confirm actions
This commit is contained in:
@@ -18,6 +18,8 @@ model User {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
userRoles UserRole[]
|
||||
authSessions AuthSession[] @relation("AuthSessionUser")
|
||||
revokedAuthSessions AuthSession[] @relation("AuthSessionRevokedBy")
|
||||
contactEntries CrmContactEntry[]
|
||||
inventoryTransactions InventoryTransaction[]
|
||||
purchaseReceipts PurchaseReceipt[]
|
||||
@@ -72,6 +74,26 @@ model RolePermission {
|
||||
@@id([roleId, permissionId])
|
||||
}
|
||||
|
||||
model AuthSession {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
expiresAt DateTime
|
||||
lastSeenAt DateTime @default(now())
|
||||
ipAddress String?
|
||||
userAgent String?
|
||||
revokedAt DateTime?
|
||||
revokedById String?
|
||||
revokedReason String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
user User @relation("AuthSessionUser", fields: [userId], references: [id], onDelete: Cascade)
|
||||
revokedBy User? @relation("AuthSessionRevokedBy", fields: [revokedById], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([userId, createdAt])
|
||||
@@index([expiresAt])
|
||||
@@index([revokedAt])
|
||||
}
|
||||
|
||||
model CompanyProfile {
|
||||
id String @id @default(cuid())
|
||||
companyName String
|
||||
|
||||
Reference in New Issue
Block a user