Documentation
¶
Overview ¶
Package model contains all databank models
Index ¶
- type Album
- type AlbumArtist
- type AlbumUser
- type Artist
- type Directory
- type DirectoryPlaylist
- type History
- type HistoryFilter
- type Link
- type Playlist
- type PlaylistTrack
- type PlaylistUser
- type Show
- type ShowUser
- type Task
- type TaskFilter
- type TaskResult
- type Track
- type TrackArtist
- type TrackFilter
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct {
ID int
SpotifyID string
Name string
TrackAmount int
Popularity int
CoverID string
CoverURL string
UpdatedAt time.Time
// Non db fields
Artists []Artist
}
func AlbumModel ¶
func (*Album) EqualEntry ¶
type AlbumArtist ¶
type Artist ¶
type Artist struct {
ID int
SpotifyID string
Name string
Followers int
Popularity int
CoverID string
CoverURL string
UpdatedAt time.Time
}
func ArtistModel ¶
func (*Artist) EqualEntry ¶
type Directory ¶
type Directory struct {
ID int
UserID int
Name string
ParentID int
// Non db fields
Playlists []Playlist
}
func DirectoryModel ¶
type DirectoryPlaylist ¶
type History ¶
type History struct {
ID int
UserID int
TrackID int
PlayedAt time.Time
AlbumID int
ArtistID int
PlaylistID int
ShowID int
// Non db fields
Track Track
}
func HistoryModel ¶
type HistoryFilter ¶
type Link ¶
type Playlist ¶
type Playlist struct {
ID int
SpotifyID string
OwnerID int
Name string
Description string
Public bool
TrackAmount int
Collaborative bool
CoverID string
CoverURL string
SnapshotID string
UpdatedAt time.Time
// Non db fields
Owner User
Duplicates []Track
Unplayables []Track
}
func PlaylistModel ¶
func (*Playlist) EqualEntry ¶
type PlaylistTrack ¶
type PlaylistUser ¶
type Show ¶
type Show struct {
ID int
SpotifyID string
Name string
EpisodeAmount int
CoverID string
CoverURL string
UpdatedAt time.Time
}
func (*Show) EqualEntry ¶
type Task ¶
type TaskFilter ¶
type TaskFilter struct {
UserID int
TaskUID string
Result *TaskResult
Limit int
Offset int
}
type TaskResult ¶
type TaskResult string
const ( TaskSuccess TaskResult = "success" TaskFailed TaskResult = "failed" )
type Track ¶
type Track struct {
ID int
SpotifyID string
Name string
Popularity int
UpdatedAt time.Time
// Non db fields
Artists []Artist
Playlist Playlist
CreatedAt time.Time
DeletedAt time.Time
}
func TrackModel ¶
func (*Track) EqualEntry ¶
type TrackArtist ¶
Click to show internal directories.
Click to hide internal directories.