mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-16 20:59:26 +00:00
add email account validation
This commit is contained in:
@@ -16,13 +16,13 @@ model Verification {
|
||||
verificationToken String? @unique @default(uuid())
|
||||
verificationTokenExpiry DateTime?
|
||||
verificationEmailsSent Int @default(0)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
id String @id @default(uuid())
|
||||
email String @unique
|
||||
password String
|
||||
isAdmin Boolean @default(false)
|
||||
@@ -40,6 +40,8 @@ model User {
|
||||
verification Verification?
|
||||
AccessToken AccessToken[]
|
||||
RefreshToken RefreshToken[]
|
||||
|
||||
@@fulltext([name, email])
|
||||
}
|
||||
|
||||
model AccessToken {
|
||||
|
||||
Reference in New Issue
Block a user