2017-12-25 19:05:32 +01:00
|
|
|
// file: datamodels/movie.go
|
|
|
|
|
|
|
|
package datamodels
|
|
|
|
|
|
|
|
// Movie is our sample data structure.
|
|
|
|
// Keep note that the tags for public-use (for our web app)
|
|
|
|
// should be kept in other file like "web/viewmodels/movie.go"
|
|
|
|
// which could wrap by embedding the datamodels.Movie or
|
|
|
|
// declare new fields instead butwe will use this datamodel
|
|
|
|
// as the only one Movie model in our application,
|
|
|
|
// for the shake of simplicty.
|
|
|
|
type Movie struct {
|
2020-05-05 15:03:19 +02:00
|
|
|
ID uint64 `json:"id"`
|
2017-12-25 19:05:32 +01:00
|
|
|
Name string `json:"name"`
|
|
|
|
Year int `json:"year"`
|
|
|
|
Genre string `json:"genre"`
|
|
|
|
Poster string `json:"poster"`
|
|
|
|
}
|