add init browse by folder

This commit is contained in:
sentriz
2019-04-30 17:35:08 +01:00
parent de807902de
commit c9b0157333
8 changed files with 250 additions and 196 deletions

View File

@@ -41,6 +41,7 @@ type Track struct {
Suffix string
ContentType string
Size int
FolderID int
Path string `gorm:"not null;unique_index"`
}
@@ -79,3 +80,13 @@ type Play struct {
TrackID int
Time time.Time
}
// Folder represents the settings table
type Folder struct {
IDBase
CrudBase
Name string
Path string `gorm:"not null;unique_index"`
Parent *Folder `gorm:"foreignkey:ParentID"`
ParentID int
}