add init browse by folder
This commit is contained in:
11
db/model.go
11
db/model.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user