rename account to author
This commit is contained in:
parent
51a40f294b
commit
94587e9dfc
@ -7,6 +7,8 @@ type Album struct {
|
|||||||
Name string `gorm:"not null"`
|
Name string `gorm:"not null"`
|
||||||
Parent *Album `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
|
Parent *Album `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
|
||||||
ParentId uint32
|
ParentId uint32
|
||||||
|
Author *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
|
||||||
|
AuthorId uint32
|
||||||
Photos []*Photo `gorm:"many2many:album_photos"`
|
Photos []*Photo `gorm:"many2many:album_photos"`
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
UpdatedAt time.Time
|
UpdatedAt time.Time
|
||||||
|
@ -7,8 +7,8 @@ type Photo struct {
|
|||||||
File string `gorm:"not null"`
|
File string `gorm:"not null"`
|
||||||
Name string `gorm:"not null"`
|
Name string `gorm:"not null"`
|
||||||
Checksum string `gorm:"unique;size:44;not null"`
|
Checksum string `gorm:"unique;size:44;not null"`
|
||||||
Account *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
|
Author *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
|
||||||
AccountId uint32
|
AuthorId uint32
|
||||||
Albums []*Album `gorm:"many2many:album_photos"`
|
Albums []*Album `gorm:"many2many:album_photos"`
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
UpdatedAt time.Time
|
UpdatedAt time.Time
|
||||||
|
Loading…
x
Reference in New Issue
Block a user