Remove old tags from models

This commit is contained in:
Deluan 2020-01-17 19:36:50 -05:00
parent 123f543a94
commit 035fdaeb96
4 changed files with 6 additions and 7 deletions

View File

@ -16,7 +16,7 @@ watch: check_go_env
.PHONY: test .PHONY: test
test: check_go_env test: check_go_env
go test ./... -v go test ./... -v
@(cd ./ui && npm test -- --watchAll=false) # @(cd ./ui && npm test -- --watchAll=false)
.PHONY: build .PHONY: build
build: check_go_env build: check_go_env

View File

@ -5,12 +5,12 @@ import "time"
type Album struct { type Album struct {
ID string ID string
Name string Name string
ArtistID string `parent:"artist"` ArtistID string
CoverArtPath string CoverArtPath string
CoverArtId string CoverArtId string
Artist string Artist string
AlbumArtist string AlbumArtist string
Year int `idx:"Year"` Year int
Compilation bool Compilation bool
Starred bool Starred bool
PlayCount int PlayCount int
@ -19,7 +19,7 @@ type Album struct {
Duration int Duration int
Rating int Rating int
Genre string Genre string
StarredAt time.Time `idx:"Starred"` StarredAt time.Time
CreatedAt time.Time CreatedAt time.Time
UpdatedAt time.Time UpdatedAt time.Time
} }

View File

@ -13,7 +13,7 @@ type MediaFile struct {
Artist string Artist string
ArtistID string ArtistID string
AlbumArtist string AlbumArtist string
AlbumID string `parent:"album"` AlbumID string
HasCoverArt bool HasCoverArt bool
TrackNumber int TrackNumber int
DiscNumber int DiscNumber int
@ -28,7 +28,7 @@ type MediaFile struct {
PlayDate time.Time PlayDate time.Time
Rating int Rating int
Starred bool Starred bool
StarredAt time.Time `idx:"Starred"` StarredAt time.Time
CreatedAt time.Time CreatedAt time.Time
UpdatedAt time.Time UpdatedAt time.Time
} }

View File

@ -9,7 +9,6 @@ import (
"github.com/cloudsonic/sonic-server/model" "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 { type Artist struct {
ID string `orm:"pk;column(id)"` ID string `orm:"pk;column(id)"`
Name string `orm:"index"` Name string `orm:"index"`