rename account to author

This commit is contained in:
celogeek 2022-02-05 21:50:59 +01:00
parent 51a40f294b
commit 94587e9dfc
Signed by: celogeek
GPG Key ID: E6B7BDCFC446233A
2 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,8 @@ type Album struct {
Name string `gorm:"not null"`
Parent *Album `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
ParentId uint32
Author *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
AuthorId uint32
Photos []*Photo `gorm:"many2many:album_photos"`
CreatedAt time.Time
UpdatedAt time.Time

View File

@ -7,8 +7,8 @@ type Photo struct {
File string `gorm:"not null"`
Name string `gorm:"not null"`
Checksum string `gorm:"unique;size:44;not null"`
Account *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
AccountId uint32
Author *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
AuthorId uint32
Albums []*Album `gorm:"many2many:album_photos"`
CreatedAt time.Time
UpdatedAt time.Time