mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Entity: Add missing json and yaml struct field tags; update swagger.json
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -1255,6 +1255,9 @@
|
||||
"CopyrightSrc": {
|
||||
"type": "string"
|
||||
},
|
||||
"CreatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"Keywords": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1273,6 +1276,9 @@
|
||||
"NotesSrc": {
|
||||
"type": "string"
|
||||
},
|
||||
"PhotoID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"Software": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1285,13 +1291,7 @@
|
||||
"SubjectSrc": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"photoID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updatedAt": {
|
||||
"UpdatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@ var photoDetailsMutex = sync.Mutex{}
|
||||
|
||||
// Details stores denormalized photo metadata to speed up search and filtering.
|
||||
type Details struct {
|
||||
PhotoID uint `gorm:"primary_key;auto_increment:false" yaml:"-"`
|
||||
PhotoID uint `gorm:"primary_key;auto_increment:false" json:"PhotoID" yaml:"-"`
|
||||
Keywords string `gorm:"type:VARCHAR(2048);" json:"Keywords" yaml:"Keywords"`
|
||||
KeywordsSrc string `gorm:"type:VARBINARY(8);" json:"KeywordsSrc" yaml:"KeywordsSrc,omitempty"`
|
||||
Notes string `gorm:"type:VARCHAR(2048);" json:"Notes" yaml:"Notes,omitempty"`
|
||||
@@ -27,8 +27,8 @@ type Details struct {
|
||||
LicenseSrc string `gorm:"type:VARBINARY(8);" json:"LicenseSrc" yaml:"LicenseSrc,omitempty"`
|
||||
Software string `gorm:"type:VARCHAR(1024);" json:"Software" yaml:"Software,omitempty"`
|
||||
SoftwareSrc string `gorm:"type:VARBINARY(8);" json:"SoftwareSrc" yaml:"SoftwareSrc,omitempty"`
|
||||
CreatedAt time.Time `yaml:"-"`
|
||||
UpdatedAt time.Time `yaml:"-"`
|
||||
CreatedAt time.Time `json:"CreatedAt" yaml:"-"`
|
||||
UpdatedAt time.Time `json:"UpdatedAt" yaml:"-"`
|
||||
}
|
||||
|
||||
// TableName returns the entity table name.
|
||||
|
||||
@@ -13,16 +13,16 @@ const (
|
||||
|
||||
// FileShare represents remote-sharing state for a file and a single connected service account.
|
||||
type FileShare struct {
|
||||
FileID uint `gorm:"primary_key;auto_increment:false"`
|
||||
ServiceID uint `gorm:"primary_key;auto_increment:false"`
|
||||
RemoteName string `gorm:"primary_key;auto_increment:false;type:VARBINARY(255)"`
|
||||
Status string `gorm:"type:VARBINARY(16);"`
|
||||
Error string `gorm:"type:VARBINARY(512);"`
|
||||
Errors int
|
||||
File *File
|
||||
Account *Service
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
FileID uint `gorm:"primary_key;auto_increment:false" json:"FileID" yaml:"FileID,omitempty"`
|
||||
ServiceID uint `gorm:"primary_key;auto_increment:false" json:"ServiceID" yaml:"ServiceID,omitempty"`
|
||||
RemoteName string `gorm:"primary_key;auto_increment:false;type:VARBINARY(255)" json:"RemoteName" yaml:"RemoteName,omitempty"`
|
||||
Status string `gorm:"type:VARBINARY(16);" json:"Status" yaml:"Status,omitempty"`
|
||||
Error string `gorm:"type:VARBINARY(512);" json:"Error,omitempty" yaml:"Error,omitempty"`
|
||||
Errors int `json:"Errors,omitempty" yaml:"Errors,omitempty"`
|
||||
File *File `json:"File,omitempty" yaml:"-"`
|
||||
Account *Service `json:"Account,omitempty" yaml:"-"`
|
||||
CreatedAt time.Time `json:"CreatedAt" yaml:"CreatedAt"`
|
||||
UpdatedAt time.Time `json:"UpdatedAt" yaml:"UpdatedAt"`
|
||||
}
|
||||
|
||||
// TableName returns the entity table name.
|
||||
|
||||
@@ -15,18 +15,18 @@ const (
|
||||
|
||||
// FileSync tracks the synchronization status for a file on an external service.
|
||||
type FileSync struct {
|
||||
RemoteName string `gorm:"primary_key;auto_increment:false;type:VARBINARY(255)"`
|
||||
ServiceID uint `gorm:"primary_key;auto_increment:false"`
|
||||
FileID uint `gorm:"index;"`
|
||||
RemoteDate time.Time
|
||||
RemoteSize int64
|
||||
Status string `gorm:"type:VARBINARY(16);"`
|
||||
Error string `gorm:"type:VARBINARY(512);"`
|
||||
Errors int
|
||||
File *File
|
||||
Account *Service
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
RemoteName string `gorm:"primary_key;auto_increment:false;type:VARBINARY(255)" json:"RemoteName" yaml:"RemoteName,omitempty"`
|
||||
ServiceID uint `gorm:"primary_key;auto_increment:false" json:"ServiceID" yaml:"ServiceID,omitempty"`
|
||||
FileID uint `gorm:"index;" json:"FileID" yaml:"FileID,omitempty"`
|
||||
RemoteDate time.Time `json:"RemoteDate,omitempty" yaml:"RemoteDate,omitempty"`
|
||||
RemoteSize int64 `json:"RemoteSize,omitempty" yaml:"RemoteSize,omitempty"`
|
||||
Status string `gorm:"type:VARBINARY(16);" json:"Status" yaml:"Status,omitempty"`
|
||||
Error string `gorm:"type:VARBINARY(512);" json:"Error,omitempty" yaml:"Error,omitempty"`
|
||||
Errors int `json:"Errors,omitempty" yaml:"Errors,omitempty"`
|
||||
File *File `json:"File,omitempty" yaml:"-"`
|
||||
Account *Service `json:"Account,omitempty" yaml:"-"`
|
||||
CreatedAt time.Time `json:"CreatedAt" yaml:"CreatedAt"`
|
||||
UpdatedAt time.Time `json:"UpdatedAt" yaml:"UpdatedAt"`
|
||||
}
|
||||
|
||||
// TableName returns the entity table name.
|
||||
|
||||
@@ -44,7 +44,7 @@ type Folder struct {
|
||||
UpdatedAt time.Time `json:"-" yaml:"-"`
|
||||
ModifiedAt time.Time `json:"ModifiedAt,omitempty" yaml:"-"`
|
||||
PublishedAt *time.Time `sql:"index" json:"PublishedAt,omitempty" yaml:"PublishedAt,omitempty"`
|
||||
DeletedAt *time.Time `sql:"index" json:"-"`
|
||||
DeletedAt *time.Time `sql:"index" json:"-" yaml:"DeletedAt,omitempty"`
|
||||
}
|
||||
|
||||
// TableName returns the entity table name.
|
||||
|
||||
@@ -11,9 +11,9 @@ var keywordMutex = sync.Mutex{}
|
||||
|
||||
// Keyword represents a normalized word used for full-text search and tagging.
|
||||
type Keyword struct {
|
||||
ID uint `gorm:"primary_key"`
|
||||
Keyword string `gorm:"type:VARCHAR(64);index;"`
|
||||
Skip bool
|
||||
ID uint `gorm:"primary_key" json:"ID,omitempty" yaml:"ID,omitempty"`
|
||||
Keyword string `gorm:"type:VARCHAR(64);index;" json:"Keyword" yaml:"Keyword,omitempty"`
|
||||
Skip bool `json:"Skip" yaml:"Skip"`
|
||||
}
|
||||
|
||||
// TableName returns the entity table name.
|
||||
|
||||
Reference in New Issue
Block a user