stash/pkg/models/movie.go

30 lines
892 B
Go
Raw Normal View History

2020-09-15 07:28:53 +00:00
package models
type MovieReader interface {
Find(id int) (*Movie, error)
FindMany(ids []int) ([]*Movie, error)
// FindBySceneID(sceneID int) ([]*Movie, error)
FindByName(name string, nocase bool) (*Movie, error)
FindByNames(names []string, nocase bool) ([]*Movie, error)
2020-09-15 07:28:53 +00:00
All() ([]*Movie, error)
Count() (int, error)
AllSlim() ([]*Movie, error)
Query(movieFilter *MovieFilterType, findFilter *FindFilterType) ([]*Movie, int, error)
2020-09-15 07:28:53 +00:00
GetFrontImage(movieID int) ([]byte, error)
GetBackImage(movieID int) ([]byte, error)
}
type MovieWriter interface {
Create(newMovie Movie) (*Movie, error)
Update(updatedMovie MoviePartial) (*Movie, error)
UpdateFull(updatedMovie Movie) (*Movie, error)
Destroy(id int) error
UpdateImages(movieID int, frontImage []byte, backImage []byte) error
DestroyImages(movieID int) error
2020-09-15 07:28:53 +00:00
}
type MovieReaderWriter interface {
MovieReader
MovieWriter
}