mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
model User {
|
|
id String @id @map("_id")
|
|
name String
|
|
email String
|
|
emailVerified Boolean
|
|
image String?
|
|
createdAt DateTime
|
|
updatedAt DateTime
|
|
sessions Session[]
|
|
accounts Account[]
|
|
|
|
@@unique([email])
|
|
@@map("user")
|
|
}
|
|
|
|
model Session {
|
|
id String @id @map("_id")
|
|
expiresAt DateTime
|
|
token String
|
|
createdAt DateTime
|
|
updatedAt DateTime
|
|
ipAddress String?
|
|
userAgent String?
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([token])
|
|
@@map("session")
|
|
}
|
|
|
|
model Account {
|
|
id String @id @map("_id")
|
|
accountId String
|
|
providerId String
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
accessToken String?
|
|
refreshToken String?
|
|
idToken String?
|
|
accessTokenExpiresAt DateTime?
|
|
refreshTokenExpiresAt DateTime?
|
|
scope String?
|
|
password String?
|
|
createdAt DateTime
|
|
updatedAt DateTime
|
|
|
|
@@map("account")
|
|
}
|
|
|
|
model Verification {
|
|
id String @id @map("_id")
|
|
identifier String
|
|
value String
|
|
expiresAt DateTime
|
|
createdAt DateTime?
|
|
updatedAt DateTime?
|
|
|
|
@@map("verification")
|
|
}
|