using System.Text.Json.Serialization; namespace MovieActorLookup.Models.Movies { public class Movie { [JsonPropertyName("id")] public int Id { get; set; } [JsonPropertyName("title")] public string? Title { get; set; } [JsonPropertyName("original_title")] public string? OriginalTitle { get; set; } [JsonPropertyName("overview")] public string? Overview { get; set; } [JsonPropertyName("adult")] public bool Adult { get; set; } [JsonPropertyName("backdrop_path")] public string? BackdropPath { get; set; } [JsonPropertyName("genre_ids")] public List GenreIds { get; set; } = new List(); [JsonPropertyName("original_language")] public string? OriginalLanguage { get; set; } [JsonPropertyName("popularity")] public double Popularity { get; set; } [JsonPropertyName("poster_path")] public string? PosterPath { get; set; } [JsonPropertyName("release_date")] public string? ReleaseDate { get; set; } [JsonPropertyName("video")] public bool Video { get; set; } [JsonPropertyName("vote_average")] public double VoteAverage { get; set; } [JsonPropertyName("vote_count")] public int VoteCount { get; set; } [JsonPropertyName("belongs_to_collection")] public CollectionInfo BelongsToCollection { get; set; } // Constructor public Movie() { GenreIds = new List(); } } public class CollectionInfo { [JsonPropertyName("id")] public int Id { get; set; } [JsonPropertyName("name")] public string Name { get; set; } [JsonPropertyName("poster_path")] public string PosterPath { get; set; } [JsonPropertyName("backdrop_path")] public string BackdropPath { get; set; } } public class MovieResponse { [JsonPropertyName("page")] public int Page { get; set; } [JsonPropertyName("results")] public List Results { get; set; } = new List(); [JsonPropertyName("total_pages")] public int TotalPages { get; set; } [JsonPropertyName("total_results")] public int TotalResults { get; set; } public MovieResponse() { Results = new List(); } } public class Genre { public int? Id { get; set; } public string? Name { get; set; } } }