Docs: Update code comments in internal/entity/category.go and details.go

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2025-10-02 16:19:57 +02:00
parent 5dda30e7e9
commit 6218c7dda6
2 changed files with 3 additions and 3 deletions

View file

@ -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"`

View file

@ -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}
}