feat: Implement testimonials module with submission, link generation, and viewing functionalities.

This commit is contained in:
pradeepkumar
2026-03-05 05:36:36 +05:30
parent 0defcb24fb
commit 87671ce8b6
8 changed files with 263 additions and 0 deletions

View File

@@ -235,8 +235,12 @@ model AgentProfile {
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
agentType AgentType? @relation(fields: [agentTypeId], references: [id])
fieldValues AgentProfileFieldValue[]
// Testimonial Link
testimonialToken String? @unique
connectionRequests ConnectionRequest[]
conversations Conversation[]
testimonials Testimonial[]
@@index([userId])
@@index([agentTypeId])
@@ -547,3 +551,24 @@ model CmsContent {
@@index([pageSlug])
@@map("cms_contents")
}
// ===========================================
// TESTIMONIALS
// ===========================================
model Testimonial {
id String @id @default(uuid())
agentProfileId String
rating Int // 1-5
text String @db.Text
authorName String
authorRole String // "Home Buyer", "Investor", etc.
isPublished Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
agentProfile AgentProfile @relation(fields: [agentProfileId], references: [id], onDelete: Cascade)
@@index([agentProfileId])
@@map("testimonials")
}