Lazy Loading & Pagination, Alpha Channel -> White Conversion, Add Height & Width to DB & API

This commit is contained in:
2021-02-28 19:23:41 -05:00
parent 6827a2994a
commit 745d843af7
18 changed files with 427 additions and 284 deletions

View File

@@ -108,6 +108,8 @@ type MediaItem struct {
IsVideo bool `json:"isVideo" gorm:"default:false;not null"`
FileName string `json:"fileName" gorm:"not null"`
OrigName string `json:"origName" gorm:"not null"`
Width int `json:"width" gorm:"not null"`
Height int `json:"height" gorm:"not null"`
Tags []*Tag `json:"tags" gorm:"many2many:media_tags;foreignKey:ID,UserID;References:ID"`
Albums []*Album `json:"albums" gorm:"many2many:media_albums;foreignKey:ID,UserID;Refrences:ID"`
UserID string `json:"userID" gorm:"not null"`