upd favorites

This commit is contained in:
2025-11-21 20:16:56 +02:00
parent 1ca20bb7a7
commit 7b38988210
2 changed files with 106 additions and 36 deletions

View File

@@ -7,13 +7,19 @@ import (
)
type Favorite struct {
ID primitive.ObjectID `json:"id" bson:"_id,omitempty"`
UserID string `json:"userId" bson:"userId"`
MediaID string `json:"mediaId" bson:"mediaId"`
MediaType string `json:"mediaType" bson:"mediaType"` // "movie" or "tv"
Title string `json:"title" bson:"title"`
PosterPath string `json:"posterPath" bson:"posterPath"`
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
ID primitive.ObjectID `json:"id" bson:"_id,omitempty"`
UserID string `json:"userId" bson:"userId"`
KinopoiskID string `json:"kinopoiskId" bson:"kinopoiskId"`
MediaID string `json:"mediaId" bson:"mediaId"` // TMDB ID for reference
MediaType string `json:"mediaType" bson:"mediaType"` // "movie" or "tv"
Title string `json:"title" bson:"title"`
NameRu string `json:"nameRu" bson:"nameRu"`
NameEn string `json:"nameEn" bson:"nameEn"`
PosterPath string `json:"posterPath" bson:"posterPath"`
PosterUrlPreview string `json:"posterUrlPreview" bson:"posterUrlPreview"`
Year int `json:"year" bson:"year"`
Rating float64 `json:"rating" bson:"rating"`
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
}
type FavoriteRequest struct {