use chrono::prelude::*;
use serde::Deserialize;
use super::{Genre, ProductionCompany, ProductionCountry, Language};
#[derive(Deserialize, Debug)]
pub struct Movie {
pub poster_path: Option<String>,
pub adult: bool,
pub overview: String,
pub release_date: NaiveDate,
#[serde(default)]
pub genre_ids: Vec<i64>,
pub id: i64,
pub original_title: String,
pub original_lnguage: Option<String>,
pub title: String,
pub backdrop_path: Option<String>,
pub popularity: f64,
pub vote_count: u64,
pub video: bool,
pub vote_average: f64
}
#[derive(Deserialize, Debug)]
pub struct MovieList {
pub page: u64,
pub results: Vec<Movie>,
pub total_results: u64,
pub total_pages: u64,
}
#[derive(Deserialize, Debug)]
pub struct MovieDetails {
pub adult: bool,
pub backdrop_path: Option<String>,
pub belongs_to_collection: Option<bool>,
pub budget: i64,
pub genres: Vec<Genre>,
pub homepage: Option<String>,
pub id: i64,
pub imdb_id: Option<String>,
pub original_language: String,
pub original_title: String,
pub overview: Option<String>,
pub popularity: f64,
pub poster_path: Option<String>,
pub production_companies: Vec<ProductionCompany>,
pub production_countries: Vec<ProductionCountry>,
pub release_date: NaiveDate,
pub revenue: i64,
pub runtime: Option<i64>,
pub spoken_languages: Vec<Language>,
pub status: String,
pub tagline: Option<String>,
pub title: String,
pub video: bool,
pub vote_average: f64,
pub vote_count: i64,
}