feat: Implement Phase 2 features including blog, collections, saved listings, manifest, and api cron sync
This commit is contained in:
+57
-3
@@ -53,9 +53,10 @@ model Session {
|
||||
}
|
||||
|
||||
model VerificationToken {
|
||||
identifier String
|
||||
token String @unique
|
||||
expires DateTime
|
||||
id_dummy String @id @default(cuid()) // Dummy ID to avoid next-auth adapter issue
|
||||
identifier String
|
||||
token String @unique
|
||||
expires DateTime
|
||||
|
||||
@@unique([identifier, token])
|
||||
}
|
||||
@@ -118,6 +119,13 @@ model Listing {
|
||||
|
||||
category Category @relation(fields: [categoryId], references: [id])
|
||||
neighborhood Neighborhood @relation(fields: [neighborhoodId], references: [id])
|
||||
|
||||
// Phase 2 Fields
|
||||
menuUrl String?
|
||||
isFeatured Boolean @default(false)
|
||||
featuredUntil DateTime?
|
||||
collections Collection[] @relation("CollectionListings")
|
||||
instagramFeed InstagramFeedCache?
|
||||
}
|
||||
|
||||
model Gallery {
|
||||
@@ -156,3 +164,49 @@ model ContactMessage {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model BlogPost {
|
||||
id String @id @default(cuid())
|
||||
slug String @unique
|
||||
titleTr String
|
||||
titleEn String
|
||||
titleRu String
|
||||
contentTr String @db.Text
|
||||
contentEn String @db.Text
|
||||
contentRu String @db.Text
|
||||
coverImage String?
|
||||
tags String[]
|
||||
relatedListingIds String[]
|
||||
|
||||
publishedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime?
|
||||
}
|
||||
|
||||
model Collection {
|
||||
id String @id @default(cuid())
|
||||
slug String @unique
|
||||
titleTr String
|
||||
titleEn String
|
||||
titleRu String
|
||||
descriptionTr String @db.Text
|
||||
descriptionEn String @db.Text
|
||||
descriptionRu String @db.Text
|
||||
coverImage String?
|
||||
|
||||
listings Listing[] @relation("CollectionListings")
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model InstagramFeedCache {
|
||||
id String @id @default(cuid())
|
||||
listingId String @unique
|
||||
handle String
|
||||
posts Json // [{ imageUrl, caption, permalink, postedAt }]
|
||||
fetchedAt DateTime @default(now())
|
||||
|
||||
listing Listing @relation(fields: [listingId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user