aboutsummaryrefslogtreecommitdiff
path: root/pkg/database
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/database')
-rw-r--r--pkg/database/sql/media.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/database/sql/media.go b/pkg/database/sql/media.go
index 59a4b83..3446f79 100644
--- a/pkg/database/sql/media.go
+++ b/pkg/database/sql/media.go
@@ -21,6 +21,8 @@ type (
MediaEXIF struct {
gorm.Model
+ Width *float64
+ Height *float64
MediaID uint
Media Media
Description *string
@@ -58,6 +60,8 @@ func (self *Media) ToModel() *media.Media {
func (m *MediaEXIF) ToModel() *media.MediaEXIF {
return &media.MediaEXIF{
+ Height: m.Height,
+ Width: m.Width,
Description: m.Description,
Camera: m.Camera,
Maker: m.Maker,
@@ -188,6 +192,8 @@ func (m *MediaRepository) GetEXIF(ctx context.Context, mediaID uint) (*media.Med
func (s *MediaRepository) CreateEXIF(ctx context.Context, id uint, info *media.MediaEXIF) error {
media := &MediaEXIF{
MediaID: id,
+ Width: info.Width,
+ Height: info.Height,
Description: info.Description,
Camera: info.Camera,
Maker: info.Maker,