Add views counter to album, photo and share

This commit is contained in:
Michael Mayer 2019-06-16 21:43:59 -07:00
parent 27530bc0be
commit 6404b76c97
3 changed files with 3 additions and 0 deletions

View file

@ -13,6 +13,7 @@ type Album struct {
AlbumName string
AlbumDescription string `gorm:"type:text;"`
AlbumNotes string `gorm:"type:text;"`
AlbumViews uint
AlbumPhoto *Photo
AlbumPhotoID uint
AlbumFavorite bool

View file

@ -25,6 +25,7 @@ type Photo struct {
PhotoLong float64
PhotoFocalLength float64
PhotoAperture float64
PhotoViews uint
Camera *Camera
CameraID uint
Lens *Lens

View file

@ -13,6 +13,7 @@ type Share struct {
ShareUUID string `gorm:"primary_key;auto_increment:false"`
PhotoID uint
AlbumID uint
ShareViews uint
ShareSecret string
SharePassword string
ShareExpires time.Time