first push

This commit is contained in:
2025-05-06 10:37:33 -04:00
parent 2b1ec3ee26
commit 74efad656a
35 changed files with 1686 additions and 0 deletions
+98
View File
@@ -0,0 +1,98 @@
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<int> GenreIds { get; set; } = new List<int>();
[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<int>();
}
}
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<Movie> Results { get; set; } = new List<Movie>();
[JsonPropertyName("total_pages")]
public int TotalPages { get; set; }
[JsonPropertyName("total_results")]
public int TotalResults { get; set; }
public MovieResponse()
{
Results = new List<Movie>();
}
}
public class Genre
{
public int? Id { get; set; }
public string? Name { get; set; }
}
}