2019-12-05 19:21:35 +01:00
|
|
|
package form
|
|
|
|
|
2020-04-20 10:38:01 +02:00
|
|
|
import "github.com/ulule/deepcopier"
|
|
|
|
|
2020-02-02 03:36:00 +01:00
|
|
|
// Album represents an album edit form.
|
2019-12-05 19:21:35 +01:00
|
|
|
type Album struct {
|
2020-05-23 20:58:58 +02:00
|
|
|
CoverUID string `json:"CoverUID"`
|
|
|
|
FolderUID string `json:"FolderUID"`
|
|
|
|
AlbumType string `json:"Type"`
|
2020-05-26 09:02:19 +02:00
|
|
|
AlbumTitle string `json:"Title"`
|
2020-07-12 16:36:39 +02:00
|
|
|
AlbumLocation string `json:"Location"`
|
2020-05-26 09:02:19 +02:00
|
|
|
AlbumCategory string `json:"Category"`
|
|
|
|
AlbumCaption string `json:"Caption"`
|
2020-05-23 20:58:58 +02:00
|
|
|
AlbumDescription string `json:"Description"`
|
|
|
|
AlbumNotes string `json:"Notes"`
|
|
|
|
AlbumFilter string `json:"Filter"`
|
|
|
|
AlbumOrder string `json:"Order"`
|
|
|
|
AlbumTemplate string `json:"Template"`
|
2020-05-26 09:02:19 +02:00
|
|
|
AlbumCountry string `json:"Country"`
|
|
|
|
AlbumYear int `json:"Year"`
|
|
|
|
AlbumMonth int `json:"Month"`
|
2020-05-23 20:58:58 +02:00
|
|
|
AlbumFavorite bool `json:"Favorite"`
|
2020-05-26 09:02:19 +02:00
|
|
|
AlbumPrivate bool `json:"Private"`
|
2020-04-20 10:38:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewAlbum(m interface{}) (f Album, err error) {
|
|
|
|
err = deepcopier.Copy(m).To(&f)
|
|
|
|
|
|
|
|
return f, err
|
2019-12-05 19:21:35 +01:00
|
|
|
}
|