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 {
|
2019-12-06 11:56:24 +01:00
|
|
|
AlbumName string `json:"AlbumName"`
|
|
|
|
AlbumDescription string `json:"AlbumDescription"`
|
|
|
|
AlbumNotes string `json:"AlbumNotes"`
|
|
|
|
AlbumOrder string `json:"AlbumOrder"`
|
|
|
|
AlbumTemplate string `json:"AlbumTemplate"`
|
2020-04-20 10:38:01 +02:00
|
|
|
AlbumFavorite bool `json:"AlbumFavorite"`
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|