feat: Introduce agent profile verification history tracking and status notifications for agents.
This commit is contained in:
@@ -161,6 +161,9 @@ model User {
|
||||
reportsSubmitted UserReport[] @relation("ReportsSubmitted")
|
||||
reportsReceived UserReport[] @relation("ReportsReceived")
|
||||
|
||||
// Verification actions (admin)
|
||||
verificationActions VerificationHistory[] @relation("VerificationActions")
|
||||
|
||||
@@index([email])
|
||||
@@index([role])
|
||||
@@index([status])
|
||||
@@ -275,6 +278,9 @@ model AgentProfile {
|
||||
@@index([agentTypeId])
|
||||
@@index([slug])
|
||||
@@index([city, state])
|
||||
// Verification History
|
||||
verificationHistory VerificationHistory[]
|
||||
|
||||
@@index([isVerified])
|
||||
@@index([verificationStatus])
|
||||
@@index([isPublic])
|
||||
@@ -761,3 +767,22 @@ model ContactMessage {
|
||||
@@index([createdAt])
|
||||
@@map("contact_messages")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// VERIFICATION HISTORY
|
||||
// ============================================
|
||||
model VerificationHistory {
|
||||
id String @id @default(uuid())
|
||||
agentProfileId String
|
||||
status VerificationStatus
|
||||
note String?
|
||||
adminId String?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
agentProfile AgentProfile @relation(fields: [agentProfileId], references: [id], onDelete: Cascade)
|
||||
admin User? @relation("VerificationActions", fields: [adminId], references: [id])
|
||||
|
||||
@@index([agentProfileId])
|
||||
@@index([createdAt])
|
||||
@@map("verification_history")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user