db

package
v0.0.0-...-fddd541 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	gorm.Model
	AlbumId     string `gorm:"unique_index"`
	Name        string `gorm:"unique_index:idx_artist_id_name"`
	ArtistId    uint   `gorm:"TYPE:integer REFERENCES artists;unique_index:idx_artist_id_name"`
	Popularity  int
	AlbumType   string
	ReleaseDate time.Time
}

type Artist

type Artist struct {
	gorm.Model
	ArtistId   string `gorm:"unique_index"`
	Name       string
	Popularity int
	Genres     string
}

type MissingRelease

type MissingRelease struct {
	gorm.Model
	ArtistName string
	AlbumName  string `gorm:"index"`
}

type Playlist

type Playlist struct {
	gorm.Model
	Service     uint   `gorm:"unique_index:idx_service_playlist_id"`
	PlaylistId  string `gorm:"unique_index:idx_service_playlist_id"`
	Name        string
	Description string
	TrackCount  *uint
	LastChanged *time.Time
}

type Release

type Release struct {
	gorm.Model
	AlbumId    uint      `gorm:"TYPE:integer REFERENCES albums"`
	PlaylistId uint      `gorm:"TYPE:integer REFERENCES playlists"`
	SyncDate   time.Time `gorm:"index"`
}

type Track

type Track struct {
	gorm.Model
	TrackId    string `gorm:"unique_index:idx_playlist_track_id"`
	PlaylistId uint   `gorm:"TYPE:integer REFERENCES playlists;unique_index:idx_playlist_track_id"`
	Name       string
	ArtistId   uint `gorm:"TYPE:integer REFERENCES artists"`
	AlbumId    uint `gorm:"TYPE:integer REFERENCES albums"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL