mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-28 09:58:50 +05:00
Add WebTorrent Player(Experimental)
This commit is contained in:
24
pkg/models/favorite.go
Normal file
24
pkg/models/favorite.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
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"`
|
||||
}
|
||||
|
||||
type FavoriteRequest struct {
|
||||
MediaID string `json:"mediaId" validate:"required"`
|
||||
MediaType string `json:"mediaType" validate:"required,oneof=movie tv"`
|
||||
Title string `json:"title" validate:"required"`
|
||||
PosterPath string `json:"posterPath"`
|
||||
}
|
||||
@@ -159,6 +159,31 @@ type Season struct {
|
||||
SeasonNumber int `json:"season_number"`
|
||||
}
|
||||
|
||||
type SeasonDetails struct {
|
||||
AirDate string `json:"air_date"`
|
||||
Episodes []Episode `json:"episodes"`
|
||||
Name string `json:"name"`
|
||||
Overview string `json:"overview"`
|
||||
ID int `json:"id"`
|
||||
PosterPath string `json:"poster_path"`
|
||||
SeasonNumber int `json:"season_number"`
|
||||
}
|
||||
|
||||
type Episode struct {
|
||||
AirDate string `json:"air_date"`
|
||||
EpisodeNumber int `json:"episode_number"`
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Overview string `json:"overview"`
|
||||
ProductionCode string `json:"production_code"`
|
||||
Runtime int `json:"runtime"`
|
||||
SeasonNumber int `json:"season_number"`
|
||||
ShowID int `json:"show_id"`
|
||||
StillPath string `json:"still_path"`
|
||||
VoteAverage float64 `json:"vote_average"`
|
||||
VoteCount int `json:"vote_count"`
|
||||
}
|
||||
|
||||
type TMDBResponse struct {
|
||||
Page int `json:"page"`
|
||||
Results []Movie `json:"results"`
|
||||
|
||||
Reference in New Issue
Block a user