Rename domain to model

This commit is contained in:
Deluan
2020-01-14 22:22:34 -05:00
parent 25686c1742
commit 0ea2bd79d9
54 changed files with 404 additions and 404 deletions
+39
View File
@@ -0,0 +1,39 @@
package model
import "time"
type Album struct {
ID string
Name string
ArtistID string `parent:"artist"`
CoverArtPath string
CoverArtId string
Artist string
AlbumArtist string
Year int `idx:"Year"`
Compilation bool
Starred bool
PlayCount int
PlayDate time.Time
SongCount int
Duration int
Rating int
Genre string
StarredAt time.Time `idx:"Starred"`
CreatedAt time.Time
UpdatedAt time.Time
}
type Albums []Album
type AlbumRepository interface {
BaseRepository
Put(m *Album) error
Get(id string) (*Album, error)
FindByArtist(artistId string) (Albums, error)
GetAll(...QueryOptions) (Albums, error)
PurgeInactive(active Albums) error
GetAllIds() ([]string, error)
GetStarred(...QueryOptions) (Albums, error)
Search(q string, offset int, size int) (Albums, error)
}