From f4e59cd261785ee9ef537373f971543cc4f21567 Mon Sep 17 00:00:00 2001 From: Christian Pointner <equinox@helsinki.at> Date: Sat, 16 Jun 2018 17:12:28 +0200 Subject: [PATCH] fix struct tags --- store/types.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/store/types.go b/store/types.go index c3dd826..0fe1110 100644 --- a/store/types.go +++ b/store/types.go @@ -55,8 +55,8 @@ type Meta struct { //******* Groups type Group struct { - ID uint `json:"-", gorm:"primary_key"` - Name string `json:"name, gorm:"unique;not null"` + ID uint `json:"-" gorm:"primary_key"` + Name string `json:"name" gorm:"unique;not null"` } func (g Group) String() string { @@ -136,14 +136,14 @@ func (g Group) String() string { // } type FileSource struct { - ID uint `json:"-", gorm:"primary_key"` + ID uint `json:"-" gorm:"primary_key"` FileName string `json:"filename"` Hash string `json:"hash"` // Import Import `json:"import"` } type FileMetadata struct { - ID uint `hson:"-", gorm:"primary_key"` + ID uint `hson:"-" gorm:"primary_key"` Artist string `json:"artist"` Title string `json:"title"` Album string `json:"album"` @@ -151,11 +151,11 @@ type FileMetadata struct { } type File struct { - ID uint `json:"id", gorm:"primary_key"` + ID uint `json:"id" gorm:"primary_key"` CreatedAt time.Time `json:"created"` UpdatedAt time.Time `json:"updated"` GroupName string `json:"group"` - Group Group `json:"-", gorm:"association_foreignkey:Name"` + Group Group `json:"-" gorm:"association_foreignkey:Name"` Source FileSource `json:"source"` SourceID uint `json:"-"` Metadata FileMetadata `json:"metadata"` @@ -176,7 +176,7 @@ type PlaylistEntry struct { } type Playlist struct { - ID uint `json:"id", gorm:"primary_key"` + ID uint `json:"id" gorm:"primary_key"` CreatedAt time.Time `json:"created"` UpdatedAt time.Time `json:"updated"` PlaylistEntries []PlaylistEntry -- GitLab