refactor: group use cases into DDD bounded contexts

Flat use_cases/ (44 files) + monolithic commands.rs/queries.rs
split into diary/, movies/, watchlist/, import/, auth/, users/,
integrations/, search/, person/, federation/ — each with own
commands.rs, queries.rs, and use case modules.

Inline tests extracted to sibling tests/ dirs.
This commit is contained in:
2026-06-02 19:49:09 +02:00
parent aadad3cfb0
commit dcc9244d4e
92 changed files with 1617 additions and 1500 deletions

View File

@@ -0,0 +1,34 @@
use uuid::Uuid;
pub struct IngestWatchEventCommand {
pub token: String,
pub raw_payload: Vec<u8>,
pub source: domain::models::WatchEventSource,
}
pub struct WatchEventConfirmation {
pub watch_event_id: Uuid,
pub rating: u8,
pub comment: Option<String>,
}
pub struct ConfirmWatchEventsCommand {
pub user_id: Uuid,
pub confirmations: Vec<WatchEventConfirmation>,
}
pub struct DismissWatchEventsCommand {
pub user_id: Uuid,
pub event_ids: Vec<Uuid>,
}
pub struct GenerateWebhookTokenCommand {
pub user_id: Uuid,
pub provider: domain::models::WatchEventSource,
pub label: Option<String>,
}
pub struct RevokeWebhookTokenCommand {
pub user_id: Uuid,
pub token_id: Uuid,
}