feat: implement dynamic categories, admin category CRUD, fix routing and cleanup
This commit is contained in:
@@ -126,6 +126,13 @@ model Listing {
|
||||
featuredUntil DateTime?
|
||||
collections Collection[] @relation("CollectionListings")
|
||||
instagramFeed InstagramFeedCache?
|
||||
|
||||
// Phase 3 Fields
|
||||
hasWidgetInstalled Boolean @default(false)
|
||||
widgetInstalledAt DateTime?
|
||||
widgetSiteUrl String?
|
||||
analytics ListingAnalyticsDaily[]
|
||||
events Event[]
|
||||
}
|
||||
|
||||
model Gallery {
|
||||
@@ -210,3 +217,49 @@ model InstagramFeedCache {
|
||||
|
||||
listing Listing @relation(fields: [listingId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model ListingAnalyticsDaily {
|
||||
id String @id @default(cuid())
|
||||
listingId String
|
||||
date DateTime
|
||||
views Int @default(0)
|
||||
whatsappClicks Int @default(0)
|
||||
phoneClicks Int @default(0)
|
||||
menuClicks Int @default(0)
|
||||
|
||||
listing Listing @relation(fields: [listingId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([listingId, date])
|
||||
}
|
||||
|
||||
model Event {
|
||||
id String @id @default(cuid())
|
||||
slug String @unique
|
||||
listingId String?
|
||||
titleTr String
|
||||
titleEn String
|
||||
titleRu String
|
||||
descriptionTr String @db.Text
|
||||
descriptionEn String @db.Text
|
||||
descriptionRu String @db.Text
|
||||
startDate DateTime
|
||||
endDate DateTime?
|
||||
coverImage String? // Openinary
|
||||
isSponsored Boolean @default(false)
|
||||
|
||||
listing Listing? @relation(fields: [listingId], references: [id])
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime?
|
||||
}
|
||||
|
||||
model GeneratedItinerary {
|
||||
id String @id @default(cuid())
|
||||
paramsHash String @unique
|
||||
params Json // budget, groupType, interests, days
|
||||
content String @db.Text
|
||||
listingIds String[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user