Skip to main content

flix_tmdb/model/
show.rs

1use chrono::NaiveDate;
2
3use super::id::ShowId;
4
5/// A deserialized Show from the TMDB API
6#[derive(Debug, Clone, serde::Deserialize)]
7pub struct Show {
8	/// The show's TMDB ID
9	pub id: ShowId,
10	/// The show's title
11	#[serde(rename = "name")]
12	pub title: String,
13	/// The show's tagline
14	pub tagline: String,
15	/// The show's overview
16	pub overview: String,
17	/// The show's first air date
18	pub first_air_date: NaiveDate,
19	/// The show's last air date
20	pub last_air_date: NaiveDate,
21	/// The total number of episodes in this show
22	pub number_of_episodes: u32,
23	/// The number of seasons in this show
24	pub number_of_seasons: u32,
25}
26
27// TODO: Genres
28// pub genres: Vec<Genre>,
29// where: struct Genre { id, name }
30
31// TODO: Network
32// pub networks: Vec<Network>
33// where: struct Network { id, name }
34
35// TODO: Company
36// pub companies: Vec<Company>
37// where: struct Company { id, name }