feat: Introduce agent profile verification history tracking and status notifications for agents.

This commit is contained in:
pradeepkumar
2026-03-21 08:55:57 +05:30
parent 31439c3b06
commit 3e7e3683ed
4 changed files with 120 additions and 1 deletions

View File

@@ -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")
}