From 6218c7dda6f608963e993021d0aad76dd045a8e4 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 2 Oct 2025 16:19:57 +0200 Subject: [PATCH] Docs: Update code comments in internal/entity/category.go and details.go Signed-off-by: Michael Mayer --- internal/entity/category.go | 2 +- internal/entity/details.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/entity/category.go b/internal/entity/category.go index ad564b4ac..d735eb752 100644 --- a/internal/entity/category.go +++ b/internal/entity/category.go @@ -1,6 +1,6 @@ package entity -// Category of labels regroups labels with the same or a similar meaning using a main/root label +// Category links labels to a root label representing the shared meaning. type Category struct { LabelID uint `gorm:"primary_key;auto_increment:false"` CategoryID uint `gorm:"primary_key;auto_increment:false"` diff --git a/internal/entity/details.go b/internal/entity/details.go index 84e48758c..ce81da893 100644 --- a/internal/entity/details.go +++ b/internal/entity/details.go @@ -10,7 +10,7 @@ import ( var photoDetailsMutex = sync.Mutex{} -// Details stores additional metadata fields for each photo to improve search performance. +// Details stores denormalized photo metadata to speed up search and filtering. type Details struct { PhotoID uint `gorm:"primary_key;auto_increment:false" yaml:"-"` Keywords string `gorm:"type:VARCHAR(2048);" json:"Keywords" yaml:"Keywords"` @@ -36,7 +36,7 @@ func (Details) TableName() string { return "details" } -// NewDetails creates new photo details. +// NewDetails constructs a Details record bound to the provided photo. func NewDetails(photo Photo) Details { return Details{PhotoID: photo.ID} }