dont use uuid
This commit is contained in:
@@ -2,9 +2,9 @@ package model
|
||||
|
||||
// Album represents the albums table
|
||||
type Album struct {
|
||||
BaseWithUUID
|
||||
Base
|
||||
Artist Artist
|
||||
ArtistID string
|
||||
Title string
|
||||
ArtistID uint
|
||||
Title string `gorm:"not null;index"`
|
||||
Tracks []Track
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package model
|
||||
|
||||
// Artist represents the artists table
|
||||
type Artist struct {
|
||||
BaseWithUUID
|
||||
Base
|
||||
Albums []Album
|
||||
Name string `gorm:"unique;n"`
|
||||
Name string `gorm:"not null;unique_index"`
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ package model
|
||||
type Cover struct {
|
||||
Base
|
||||
Album Album
|
||||
AlbumID string
|
||||
AlbumID uint
|
||||
Image []byte
|
||||
Path string
|
||||
Path string `gorm:"not null;unique_index"`
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ package model
|
||||
type Track struct {
|
||||
Base
|
||||
Album Album
|
||||
AlbumID string
|
||||
AlbumID uint
|
||||
Artist Artist
|
||||
ArtistID string
|
||||
ArtistID uint
|
||||
Bitrate int
|
||||
Codec string
|
||||
DiscNumber int
|
||||
@@ -16,5 +16,5 @@ type Track struct {
|
||||
TotalTracks int
|
||||
TrackNumber int
|
||||
Year int
|
||||
Path string `gorm:"not null;unique"`
|
||||
Path string `gorm:"not null;unique_index"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user