add playlist support

This commit is contained in:
sentriz
2019-11-27 01:46:13 +00:00
parent 605c587fd9
commit dd93aa5e74
7 changed files with 129 additions and 17 deletions

View File

@@ -111,12 +111,13 @@ func (a *Album) IndexRightPath() string {
type Playlist struct {
ID int `gorm:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
ModifiedAt time.Time
User *User
UserID int `sql:"default: null; type:int REFERENCES users(id) ON DELETE CASCADE"`
Name string
Comment string
TrackCount int `sql:"-"`
}
type PlaylistItem struct {