Documentation ¶
Index ¶
- func Migrate(db *gorm.DB) error
- type Audio
- type Category
- type CategoryMovie
- type CategoryTvShow
- type Episode
- type MediaFile
- type Model
- type Movie
- type MovieComment
- type MovieRating
- type MovieWatchListItem
- type Subtitle
- type TvShow
- type TvShowComment
- type TvShowRating
- type TvShowWatchListItem
- type WatchListStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CategoryMovie ¶ added in v1.0.1
type CategoryMovie struct { MovieID int `gorm:"primaryKey"` Movie Movie `gorm:"reference:MovieID;constraint:OnDelete:CASCADE;"` CategoryID string `gorm:"type:uuid;primaryKey"` Category Category `gorm:"reference:CategoryID;constraint:OnDelete:CASCADE;"` }
func (CategoryMovie) TableName ¶ added in v1.0.1
func (CategoryMovie) TableName() string
type CategoryTvShow ¶ added in v1.0.1
type CategoryTvShow struct { TvShowID int `gorm:"primaryKey"` TvShow TvShow `gorm:"reference:TvShowID;constraint:OnDelete:CASCADE;"` CategoryID string `gorm:"type:uuid;primaryKey"` Category Category `gorm:"reference:CategoryID;constraint:OnDelete:CASCADE;"` }
func (CategoryTvShow) TableName ¶ added in v1.0.1
func (CategoryTvShow) TableName() string
type Episode ¶
type Episode struct { ID int `gorm:"primaryKey"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` Name string NbEpisode int NbSeason int ReleaseDate time.Time `gorm:"type:date"` TvShowID int `gorm:"not null"` TvShow TvShow `gorm:"reference:TvShowID"` MediaFileID *string `gorm:"type:uuid"` MediaFile *MediaFile `gorm:"reference:MediaFileID;constraint:OnDelete:SET NULL;"` }
type Movie ¶
type Movie struct { ID int `gorm:"primaryKey"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` Name string ReleaseDate time.Time `gorm:"type:date"` MediaFileID *string `gorm:"type:uuid"` MediaFile *MediaFile `gorm:"reference:MediaFileID;constraint:OnDelete:SET NULL;"` Categories []Category `gorm:"many2many:category_movie;constraint:OnDelete:CASCADE;"` Ratings []MovieRating `gorm:"foreignKey:MovieID;constraint:OnDelete:CASCADE;"` Comments []MovieComment `gorm:"foreignKey:MovieID;constraint:OnDelete:CASCADE;"` }
type MovieComment ¶ added in v1.0.1
type MovieRating ¶ added in v1.0.1
type MovieWatchListItem ¶ added in v1.0.1
type MovieWatchListItem struct { UserID string `gorm:"type:uuid;primaryKey"` MovieID int `gorm:"primaryKey"` Movie Movie `gorm:"reference:MovieID;constraint:OnDelete:CASCADE;"` Status WatchListStatus `gorm:"index;not null;default:PLAN_TO_WATCH"` }
func (MovieWatchListItem) TableName ¶ added in v1.0.1
func (MovieWatchListItem) TableName() string
type TvShow ¶
type TvShow struct { ID int `gorm:"primaryKey"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` Name string ReleaseDate time.Time `gorm:"type:date"` Episodes []Episode `gorm:"foreignKey:TvShowID;constraint:OnDelete:CASCADE;"` Categories []Category `gorm:"many2many:category_tv_show;constraint:OnDelete:CASCADE;"` Ratings []TvShowRating `gorm:"foreignKey:TvShowID;constraint:OnDelete:CASCADE;"` Comments []TvShowComment `gorm:"foreignKey:TvShowID;constraint:OnDelete:CASCADE;"` }
type TvShowComment ¶ added in v1.0.1
type TvShowRating ¶ added in v1.0.1
type TvShowWatchListItem ¶ added in v1.0.1
type TvShowWatchListItem struct { UserID string `gorm:"type:uuid;primaryKey"` TvShowID int `gorm:"primaryKey"` TvShow TvShow `gorm:"reference:TvShowID;constraint:OnDelete:CASCADE;"` Status WatchListStatus `gorm:"index;not null;default:PLAN_TO_WATCH"` }
func (TvShowWatchListItem) TableName ¶ added in v1.0.4
func (TvShowWatchListItem) TableName() string
type WatchListStatus ¶ added in v0.5.18
type WatchListStatus string
const ( WatchListStatusPlanToWatch WatchListStatus = "PLAN_TO_WATCH" WatchListStatusWatching WatchListStatus = "WATCHING" WatchListStatusFinished WatchListStatus = "FINISHED" WatchListStatusAbandoned WatchListStatus = "ABANDONED" )
Click to show internal directories.
Click to hide internal directories.