diff options
| author | Bobby <[email protected]> | 2025-07-18 17:07:23 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-07-18 17:07:23 +0530 |
| commit | aa0405ee98c45a9bb25dd9959d899bbd56bc1b02 (patch) | |
| tree | c6b75124708f3a3ab5fecbdb454eb5f530dd2ffa /models/user.go | |
| parent | 821773b12c07a4bc23628e7d98ac4b34da1eb9e1 (diff) | |
| download | imageboard-aa0405ee98c45a9bb25dd9959d899bbd56bc1b02.tar.xz imageboard-aa0405ee98c45a9bb25dd9959d899bbd56bc1b02.zip | |
favourite system and ∂etails on single page
Diffstat (limited to 'models/user.go')
| -rw-r--r-- | models/user.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go index ecb139f..d918db7 100644 --- a/models/user.go +++ b/models/user.go @@ -30,6 +30,7 @@ type User struct { LastLoginAt *time.Time `gorm:"default:null" json:"last_login_at"` LastActivityAt *time.Time `gorm:"default:null" json:"last_activity_at"` Images []Image `gorm:"foreignKey:UploaderID" json:"images,omitempty"` + FavoritedImages []Image `gorm:"many2many:user_favorites" json:"favorited_images,omitempty"` } func (u *User) BeforeCreate(tx *gorm.DB) error { |
