2021-09-17 14:26:12 +02:00
|
|
|
package form
|
|
|
|
|
|
|
|
import "github.com/ulule/deepcopier"
|
|
|
|
|
|
|
|
// Subject represents an image subject edit form.
|
|
|
|
type Subject struct {
|
|
|
|
SubjName string `json:"Name"`
|
|
|
|
SubjAlias string `json:"Alias"`
|
2023-03-10 10:21:46 +01:00
|
|
|
SubjAbout string `json:"About"`
|
2021-09-17 14:26:12 +02:00
|
|
|
SubjBio string `json:"Bio"`
|
|
|
|
SubjNotes string `json:"Notes"`
|
|
|
|
SubjFavorite bool `json:"Favorite"`
|
2021-10-06 15:27:17 +02:00
|
|
|
SubjHidden bool `json:"Hidden"`
|
2021-09-17 14:26:12 +02:00
|
|
|
SubjPrivate bool `json:"Private"`
|
|
|
|
SubjExcluded bool `json:"Excluded"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewSubject(m interface{}) (f Subject, err error) {
|
|
|
|
err = deepcopier.Copy(m).To(&f)
|
|
|
|
|
|
|
|
return f, err
|
|
|
|
}
|