forgot password in login page and account info implemented, sms.ir service works fine with sandbox key.

This commit is contained in:
2026-07-04 00:01:58 +03:30
parent 2f95559087
commit 3f7364dbf0
26 changed files with 1000 additions and 38 deletions

View File

@@ -11,6 +11,7 @@ datasource db {
model User {
id String @id @default(uuid())
email String @unique
mobile String? @unique
passwordHash String?
googleId String? @unique
facebookId String? @unique
@@ -23,6 +24,7 @@ model User {
sessions Session[] // 👈 ADD THIS - opposite relation for Session
sentStaffInvites StaffInvitation[]
sentOrganizationInvitations OrganizationInvitation[]
phoneVerificationCodes PhoneVerificationCode[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -30,6 +32,22 @@ model User {
@@map("users")
}
model PhoneVerificationCode {
id String @id @default(uuid())
userId String?
mobile String
codeHash String
purpose String
expiresAt DateTime
verifiedAt DateTime?
createdAt DateTime @default(now())
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
@@index([mobile, purpose, createdAt])
@@map("phone_verification_codes")
}
model OrganizationType {
id String @id @default(uuid())
name String @unique // "CLINIC" or "LAB"