rating-orama/core/repository/repository.go
2023-04-09 06:45:27 +02:00

17 lines
531 B
Go

package repository
import "github.com/zepyrshut/rating-orama/models"
type DBRepo interface {
CheckIfTvShowExists(showID string) bool
InsertTvShow(tvShow models.TvShow) error
InsertEpisodes(tvShow models.TvShow) error
FetchTvShow(showID string) (models.TvShow, error)
IncreasePopularity(showID string)
FetchEpisodes(showID string) ([]models.Season, error)
TvShowAverageRating(show *models.TvShow)
SeasonAverageRating(show *models.TvShow)
TvShowMedianRating(show *models.TvShow)
SeasonMedianRating(show *models.TvShow)
}