From 035fdaeb969f06a64f873a15da78699946af9b6e Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 17 Jan 2020 19:36:50 -0500 Subject: [PATCH] Remove old tags from models --- Makefile | 2 +- model/album.go | 6 +++--- model/mediafile.go | 4 ++-- persistence/artist_repository.go | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4bc25696..9dfd4f89 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ watch: check_go_env .PHONY: test test: check_go_env go test ./... -v - @(cd ./ui && npm test -- --watchAll=false) +# @(cd ./ui && npm test -- --watchAll=false) .PHONY: build build: check_go_env diff --git a/model/album.go b/model/album.go index cbed9301..05951945 100644 --- a/model/album.go +++ b/model/album.go @@ -5,12 +5,12 @@ import "time" type Album struct { ID string Name string - ArtistID string `parent:"artist"` + ArtistID string CoverArtPath string CoverArtId string Artist string AlbumArtist string - Year int `idx:"Year"` + Year int Compilation bool Starred bool PlayCount int @@ -19,7 +19,7 @@ type Album struct { Duration int Rating int Genre string - StarredAt time.Time `idx:"Starred"` + StarredAt time.Time CreatedAt time.Time UpdatedAt time.Time } diff --git a/model/mediafile.go b/model/mediafile.go index d64f1179..118c0d77 100644 --- a/model/mediafile.go +++ b/model/mediafile.go @@ -13,7 +13,7 @@ type MediaFile struct { Artist string ArtistID string AlbumArtist string - AlbumID string `parent:"album"` + AlbumID string HasCoverArt bool TrackNumber int DiscNumber int @@ -28,7 +28,7 @@ type MediaFile struct { PlayDate time.Time Rating int Starred bool - StarredAt time.Time `idx:"Starred"` + StarredAt time.Time CreatedAt time.Time UpdatedAt time.Time } diff --git a/persistence/artist_repository.go b/persistence/artist_repository.go index b1955f33..714a431e 100644 --- a/persistence/artist_repository.go +++ b/persistence/artist_repository.go @@ -9,7 +9,6 @@ import ( "github.com/cloudsonic/sonic-server/model" ) -// This is used to isolate Storm's struct tags from the domain, to keep it agnostic of persistence details type Artist struct { ID string `orm:"pk;column(id)"` Name string `orm:"index"`