feat: MovieDto enrichment, movie detail page, PWA, watchlist, watchlist federation
This commit is contained in:
@@ -6,6 +6,7 @@ pub mod movies;
|
||||
pub mod search;
|
||||
pub mod social;
|
||||
pub mod users;
|
||||
pub mod watchlist;
|
||||
|
||||
pub use auth::*;
|
||||
pub use common::*;
|
||||
@@ -14,3 +15,4 @@ pub use import::*;
|
||||
pub use movies::*;
|
||||
pub use social::*;
|
||||
pub use users::*;
|
||||
pub use watchlist::*;
|
||||
|
||||
@@ -10,6 +10,10 @@ pub struct MoviesQueryParams {
|
||||
pub offset: Option<u32>,
|
||||
/// Optional title filter (case-insensitive substring match)
|
||||
pub search: Option<String>,
|
||||
/// Filter by genre name (case-insensitive)
|
||||
pub genre: Option<String>,
|
||||
/// Filter by ISO language code (e.g. "en")
|
||||
pub language: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
||||
@@ -79,6 +83,11 @@ pub struct MovieDto {
|
||||
pub release_year: u16,
|
||||
pub director: Option<String>,
|
||||
pub poster_path: Option<String>,
|
||||
pub genres: Vec<String>,
|
||||
pub runtime_minutes: Option<u32>,
|
||||
pub original_language: Option<String>,
|
||||
pub overview: Option<String>,
|
||||
pub collection_name: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
||||
|
||||
29
crates/api-types/src/watchlist.rs
Normal file
29
crates/api-types/src/watchlist.rs
Normal file
@@ -0,0 +1,29 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::movies::MovieDto;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
||||
pub struct WatchlistEntryDto {
|
||||
pub id: Uuid,
|
||||
pub movie: MovieDto,
|
||||
pub added_at: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
||||
pub struct WatchlistResponse {
|
||||
pub items: Vec<WatchlistEntryDto>,
|
||||
pub total_count: u64,
|
||||
pub limit: u32,
|
||||
pub offset: u32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, utoipa::ToSchema)]
|
||||
pub struct AddToWatchlistRequest {
|
||||
pub movie_id: Uuid,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, utoipa::ToSchema)]
|
||||
pub struct WatchlistStatusResponse {
|
||||
pub on_watchlist: bool,
|
||||
}
|
||||
Reference in New Issue
Block a user