feat: Implement testimonials module with submission, link generation, and viewing functionalities.
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user