mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
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:
parent
5dda30e7e9
commit
6218c7dda6
2 changed files with 3 additions and 3 deletions
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue