SQL/Orm AlbumRepository complete

This commit is contained in:
Deluan
2020-01-12 18:55:55 -05:00
committed by Deluan Quintão
parent 56273dd4d9
commit b9815fc653
9 changed files with 196 additions and 19 deletions

View File

@@ -55,6 +55,7 @@ func WithTx(block func(orm.Ormer) error) error {
func initORM(dbPath string) error {
orm.Debug = true
orm.RegisterModel(new(Artist))
orm.RegisterModel(new(Album))
orm.RegisterModel(new(MediaFile))
err := orm.RegisterDataBase("default", "sqlite3", dbPath)
if err != nil {