feat: complete payment retry, reviews system, catalog mode enforcement, and UI text defaults
Deploy Canina / deploy (push) Successful in 1m48s
Deploy Canina / deploy (push) Successful in 1m48s
This commit is contained in:
1 parent
e1b035d6dd
commit
2fca778930
24 files changed
+2297
-242
No files matched your search
@@ -30,6 +30,7 @@ model User {
|
||||
partnerAccount PartnerAccount?
|
||||
paymentTransactions PaymentTransaction[]
|
||||
tickets Ticket[]
|
||||
reviews ProductReview[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -163,6 +164,7 @@ model Product {
|
||||
orderItems OrderItem[]
|
||||
advisorRules SmartAdvisorRule[]
|
||||
inventoryReservations InventoryReservation[]
|
||||
reviews ProductReview[]
|
||||
|
||||
@@index([categorySlug])
|
||||
@@index([suitableFor])
|
||||
@@ -671,4 +673,26 @@ model TicketMessage {
|
||||
@@map("ticket_messages")
|
||||
}
|
||||
|
||||
model ProductReview {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
productId String @map("product_id") @db.Uuid
|
||||
userId String? @map("user_id") @db.Uuid
|
||||
userName String @map("user_name") @db.VarChar(100)
|
||||
userPhone String? @map("user_phone") @db.VarChar(20)
|
||||
rating Int @default(5)
|
||||
comment String @db.Text
|
||||
status String @default("PENDING") @db.VarChar(20) // PENDING, APPROVED, REJECTED
|
||||
adminReply String? @map("admin_reply") @db.Text
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz()
|
||||
updatedAt DateTime @default(now()) @updatedAt @map("updated_at") @db.Timestamptz()
|
||||
|
||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([productId])
|
||||
@@index([status])
|
||||
@@index([createdAt])
|
||||
@@map("product_reviews")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user