ajout de la gestion des favoris
All checks were successful
Build and Push App / build (push) Successful in 13m38s
All checks were successful
Build and Push App / build (push) Successful in 13m38s
This commit is contained in:
@@ -34,6 +34,7 @@ model User {
|
||||
reports MessageReport[]
|
||||
ratings Rating[]
|
||||
country Country? @relation(fields: [countryId], references: [id])
|
||||
favorites Favorite[]
|
||||
}
|
||||
|
||||
model Business {
|
||||
@@ -82,6 +83,7 @@ model Business {
|
||||
conversations Conversation[]
|
||||
offers Offer[]
|
||||
ratings Rating[]
|
||||
favorites Favorite[]
|
||||
}
|
||||
|
||||
model BusinessCategory {
|
||||
@@ -317,6 +319,17 @@ model Event {
|
||||
tags String[] @default([])
|
||||
}
|
||||
|
||||
model Favorite {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
businessId String
|
||||
createdAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, businessId])
|
||||
}
|
||||
|
||||
enum RatingStatus {
|
||||
PENDING
|
||||
APPROVED
|
||||
|
||||
Reference in New Issue
Block a user