feat: Implement agent verification system with a new status enum, admin update functionality, and document retrieval.
This commit is contained in:
@@ -49,6 +49,13 @@ enum FieldType {
|
||||
REPEATER // Repeatable group of fields (e.g., certification + years)
|
||||
}
|
||||
|
||||
enum VerificationStatus {
|
||||
NONE // Agent hasn't uploaded documents
|
||||
PENDING_REVIEW // Documents uploaded, awaiting admin review
|
||||
APPROVED // Admin approved verification
|
||||
REJECTED // Admin rejected verification
|
||||
}
|
||||
|
||||
|
||||
// ===========================================
|
||||
// USER - Authentication Only
|
||||
@@ -156,8 +163,11 @@ model AgentProfile {
|
||||
instagramUrl String?
|
||||
|
||||
// Verification Status
|
||||
isVerified Boolean @default(false)
|
||||
verifiedAt DateTime?
|
||||
isVerified Boolean @default(false)
|
||||
verificationStatus VerificationStatus @default(NONE)
|
||||
verificationNote String? // Admin note (rejection reason)
|
||||
verifiedAt DateTime?
|
||||
verifiedBy String? // Admin user ID who verified
|
||||
|
||||
// Profile Status
|
||||
isProfileComplete Boolean @default(false)
|
||||
@@ -183,6 +193,7 @@ model AgentProfile {
|
||||
@@index([slug])
|
||||
@@index([city, state])
|
||||
@@index([isVerified])
|
||||
@@index([verificationStatus])
|
||||
@@index([isPublic])
|
||||
@@index([isFeatured])
|
||||
@@map("agent_profiles")
|
||||
|
||||
Reference in New Issue
Block a user