refactor: split domain models, move presentation logic out of app layer
Some checks failed
CI / Check / Test (push) Failing after 47s

Split domain/models/mod.rs (630 lines) into focused files:
movie.rs, review.rs, user.rs, stats.rs, enrichment.rs, feed.rs.

Move URL/date formatting from application use cases to
presentation mappers — use cases now return raw domain data.

Delete watchlist/get_page.rs (was pure presentation logic),
replace with presentation/mappers/watchlist.rs.

Document signature conventions in CONTRIBUTING.md.
This commit is contained in:
2026-06-09 02:29:11 +02:00
parent ac03182aa6
commit 70b3ca0f5c
23 changed files with 761 additions and 1150 deletions

View File

@@ -8,6 +8,16 @@ use domain::models::{
collections::Paginated,
};
#[derive(Clone, Debug)]
pub struct WatchlistDisplayEntry {
pub poster_url: Option<String>,
pub movie_title: String,
pub release_year: u16,
pub movie_url: Option<String>,
pub added_at: String,
pub remove_url: Option<String>,
}
mod filters {
#[askama::filter_fn]
pub fn poster_src<T: std::fmt::Display>(
@@ -126,7 +136,7 @@ pub struct MovieDetailTemplate<'a> {
pub struct WatchlistTemplate<'a> {
pub ctx: &'a HtmlPageContext,
pub owner_id: uuid::Uuid,
pub display_entries: &'a [application::ports::WatchlistDisplayEntry],
pub display_entries: &'a [crate::WatchlistDisplayEntry],
pub current_offset: u32,
pub has_more: bool,
pub limit: u32,