diff --git a/MagicStreamServer/models/movie_model.go b/MagicStreamServer/models/movie_model.go index 6cb4d27..d0b5cbf 100644 --- a/MagicStreamServer/models/movie_model.go +++ b/MagicStreamServer/models/movie_model.go @@ -17,10 +17,11 @@ type Ranking struct { type Movie struct { ID bson.ObjectID `bson:"_id" json:"_id"` ImdbID string `bson:"imdb_id" json:"imdb_id" validate:"required"` + ReleaseYear int `bson:"release_year" json:"release_year" validate:"required"` // how to get this to be a numeric value that is four digits starting with 19? Title string `bson:"title" json:"title" validate:"required,min=2,max=500"` PosterPath string `bson:"poster_path" json:"poster_path" validate:"required,url"` YoutubeId string `bson:"youtube_id" json:"youtube_id" validate:"required"` Genre []Genre `bson:"genre" json:"genre" validate:"required,dive"` AdminReview string `bson:"admin_review" json:"admin_review" validate:"required"` - Ranking Ranking `bson:"ranking" json:"ranking" validate:"required"` + Ranking Ranking `bson:"ranking" json:"ranking" validate:"required"` } diff --git a/seed-data/movies.json b/seed-data/movies.json index d3b7fd5..acdf355 100644 --- a/seed-data/movies.json +++ b/seed-data/movies.json @@ -2,6 +2,7 @@ { "imdb_id": "tt0111161", "title": "The Shawshank Redemption", + "release_year": 1994, "poster_path": "https://image.tmdb.org/t/p/w300/2GgerXCbCMgvt2kLwWEmJWCSG65.jpg", "youtube_id": "PLl99DlL6b4", "genre": [ @@ -19,6 +20,7 @@ { "imdb_id": "tt7131622", "title": "Once upon a time in Hollywood", + "release_year": 2019, "poster_path": "https://image.tmdb.org/t/p/w300/wQKeS2JrsRF8XSfd9zqflrc5gad.jpg", "youtube_id": "ELeMaP8EPAA", "genre": [ @@ -40,6 +42,7 @@ { "imdb_id": "tt0080339", "title": "Airplane!", + "release_year": 1980, "poster_path": "https://image.tmdb.org/t/p/w300/zOiB3p2WTTiwCFgTMnXuDGgzbTN.jpg", "youtube_id": "07pPmCfKi3U", "genre": [ @@ -57,6 +60,7 @@ { "imdb_id": "tt1119646", "title": "The Hangover", + "release_year": 2009, "poster_path": "https://image.tmdb.org/t/p/w300/c15rH9S5JN83UXqu9iM4TQsW6Rl.jpg", "youtube_id": "jj6wcUes1no", "genre": [ @@ -74,6 +78,7 @@ { "imdb_id": "tt0109040", "title": "Ace Ventura: Pet Detective", + "release_year": 1994, "poster_path": "https://image.tmdb.org/t/p/w300/dukxJWd72ffNWfqfFSVFFuym4RG.jpg", "youtube_id": "qjBb1CKLpzE", "genre": [ @@ -91,6 +96,7 @@ { "imdb_id": "tt0105695", "title": "Unforgiven", + "release_year": 1992, "poster_path": "https://image.tmdb.org/t/p/w300/7W0CsZBe5fkX29DvHBi5Ct1WqLe.jpg", "youtube_id": "6_UlfsdGiEc", "genre": [ @@ -112,6 +118,7 @@ { "imdb_id": "tt0060196", "title": "The Good, The Bad, and the Ugly", + "release_year": 1966, "poster_path": "https://image.tmdb.org/t/p/w300/e881nA7p982CHL5GjI1LICwHMd7.jpg", "youtube_id": "WCN5JJY_wiA", "genre": [ @@ -129,6 +136,7 @@ { "imdb_id": "tt0903624", "title": "The Hobbit: An Unexpected Journey", + "release_year": 2012, "poster_path": "https://image.tmdb.org/t/p/w300/vdAGcr1F6wJPRryeODVAcy2mU4z.jpg", "youtube_id": "9PSXjr1gbjc", "genre": [ @@ -146,6 +154,7 @@ { "imdb_id": "tt0241527", "title": "Harry Potter and the Philosopher's Stone", + "release_year": 2001, "poster_path": "https://image.tmdb.org/t/p/w300/e6JYlushXIXK85JGfDHEFHrrNYK.jpg", "youtube_id": "VyHV0BRtdxo", "genre": [ @@ -163,6 +172,7 @@ { "imdb_id": "tt2267998", "title": "Gone Girl", + "release_year": 2014, "poster_path": "https://image.tmdb.org/t/p/w300/xpA0q0DJWKe7AY63pVPZbGLwuo5.jpg", "youtube_id": "2-_-1nJf8Vg", "genre": [ @@ -184,6 +194,7 @@ { "imdb_id": "tt8946378", "title": "Knives Out", + "release_year": 2019, "poster_path": "https://image.tmdb.org/t/p/w300/hVcCOlHU0HmGBBQNmS9RlalBXGz.jpg", "youtube_id": "qGqiHJTsRkQ", "genre": [ @@ -209,6 +220,7 @@ { "imdb_id": "tt0080684", "title": "Star Wars: The Empire Strikes Back", + "release_year": 1980, "poster_path": "https://image.tmdb.org/t/p/w300/1mh82R1qLKwdutQVGnpHItdwPCP.jpg", "youtube_id": "JNwNXF9Y6kY", "genre": [ @@ -230,6 +242,7 @@ { "imdb_id": "tt0102975", "title": "Star Trek: The Undiscovered Country", + "release_year": 1991, "poster_path": "https://image.tmdb.org/t/p/w300/jukY1tFpuXgqrJLl1PvdOMarCvN.jpg", "youtube_id": "RYA2q2Sm_Jo", "genre": [ @@ -251,6 +264,7 @@ { "imdb_id": "tt1297919", "title": "Blitz", + "release_year": 2011, "poster_path": "https://image.tmdb.org/t/p/w300/tI4fPu0LZ0FNdZdi6fvYGCRiuQs.jpg", "youtube_id": "mhO2WJ3MNRI", "genre": [ @@ -276,6 +290,7 @@ { "imdb_id": "tt0790724", "title": "Jack Reacher", + "release_year": 2012, "poster_path": "https://image.tmdb.org/t/p/w300/8sih1uieUopA9zrEO1meNhmm7aO.jpg", "youtube_id": "A7FiWkyevqY", "genre": [