refactor: remaining MEDIUM — CQRS splits, DI Deps, profile dedup, event Value, response enum
M1: MovieRepository→MovieCommand/MovieQuery, WatchEventRepository→ WatchEventCommand/WatchEventQuery M2: goals/ and import/ use Deps structs M7: extract upload_image helper in update_profile M8: FederationDeliveryRequested activity_json String→serde_json::Value M11: UserProfileResponse uses ProfileViewData enum
This commit is contained in:
31
crates/application/src/import/deps.rs
Normal file
31
crates/application/src/import/deps.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use domain::ports::{DocumentParser, ImportProfileRepository, ImportSessionRepository, MovieQuery};
|
||||
|
||||
use crate::ports::ReviewLogger;
|
||||
|
||||
pub struct CreateSessionDeps {
|
||||
pub import_session: Arc<dyn ImportSessionRepository>,
|
||||
pub document_parser: Arc<dyn DocumentParser>,
|
||||
}
|
||||
|
||||
pub struct ApplyMappingDeps {
|
||||
pub import_session: Arc<dyn ImportSessionRepository>,
|
||||
pub document_parser: Arc<dyn DocumentParser>,
|
||||
pub movie_query: Arc<dyn MovieQuery>,
|
||||
}
|
||||
|
||||
pub struct ApplyProfileDeps {
|
||||
pub import_profile: Arc<dyn ImportProfileRepository>,
|
||||
pub import_session: Arc<dyn ImportSessionRepository>,
|
||||
}
|
||||
|
||||
pub struct ExecuteImportDeps {
|
||||
pub import_session: Arc<dyn ImportSessionRepository>,
|
||||
pub review_logger: Arc<dyn ReviewLogger>,
|
||||
}
|
||||
|
||||
pub struct SaveProfileDeps {
|
||||
pub import_session: Arc<dyn ImportSessionRepository>,
|
||||
pub import_profile: Arc<dyn ImportProfileRepository>,
|
||||
}
|
||||
Reference in New Issue
Block a user