Add place enrichment favorites and AI search
Build and deploy Backend / build (push) Successful in 1m1s
Build and deploy Backend / build (push) Successful in 1m1s
This commit is contained in:
+33
-10
@@ -17,16 +17,25 @@ enum VoiceExperienceStatus {
|
||||
}
|
||||
|
||||
model Place {
|
||||
id String @id @default(cuid())
|
||||
googlePlaceId String @unique
|
||||
name String
|
||||
latitude Float
|
||||
longitude Float
|
||||
googlePrimaryType String?
|
||||
googleTypes String[] @default([])
|
||||
experiences VoiceExperience[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
id String @id @default(cuid())
|
||||
googlePlaceId String @unique
|
||||
name String
|
||||
latitude Float
|
||||
longitude Float
|
||||
googlePrimaryType String?
|
||||
googleTypes String[] @default([])
|
||||
googleBusinessStatus String?
|
||||
googleRating Float?
|
||||
googleUserRatingCount Int?
|
||||
googleRegularOpeningHours Json?
|
||||
googleCurrentOpeningHours Json?
|
||||
googlePhotos Json?
|
||||
googlePayload Json?
|
||||
googlePayloadFetchedAt DateTime?
|
||||
experiences VoiceExperience[]
|
||||
favoriteUsers UserFavoritePlace[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model User {
|
||||
@@ -41,10 +50,22 @@ model User {
|
||||
sessions UserSession[]
|
||||
loginRequests TelegramLoginRequest[]
|
||||
voiceExperiences VoiceExperience[]
|
||||
favoritePlaces UserFavoritePlace[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model UserFavoritePlace {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
placeId String
|
||||
place Place @relation(fields: [placeId], references: [id])
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([userId, placeId])
|
||||
}
|
||||
|
||||
model UserSession {
|
||||
id String @id @default(cuid())
|
||||
tokenHash String @unique
|
||||
@@ -82,6 +103,8 @@ model VoiceExperience {
|
||||
status VoiceExperienceStatus @default(UPLOADED)
|
||||
transcript String?
|
||||
analysis Json?
|
||||
recordingPayload Json?
|
||||
promptHintsShown String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user