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:
37
crates/application/src/import/commands.rs
Normal file
37
crates/application/src/import/commands.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
use domain::models::{FieldMapping, FileFormat};
|
||||
use uuid::Uuid;
|
||||
|
||||
pub struct CreateImportSessionCommand {
|
||||
pub user_id: Uuid,
|
||||
pub bytes: Vec<u8>,
|
||||
pub format: FileFormat,
|
||||
}
|
||||
|
||||
pub struct ApplyImportMappingCommand {
|
||||
pub user_id: Uuid,
|
||||
pub session_id: Uuid,
|
||||
pub mappings: Vec<FieldMapping>,
|
||||
}
|
||||
|
||||
pub struct ExecuteImportCommand {
|
||||
pub user_id: Uuid,
|
||||
pub session_id: Uuid,
|
||||
pub confirmed_indices: Vec<usize>,
|
||||
}
|
||||
|
||||
pub struct SaveImportProfileCommand {
|
||||
pub user_id: Uuid,
|
||||
pub session_id: Uuid,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
pub struct ApplyImportProfileCommand {
|
||||
pub user_id: Uuid,
|
||||
pub session_id: Uuid,
|
||||
pub profile_id: Uuid,
|
||||
}
|
||||
|
||||
pub struct DeleteImportProfileCommand {
|
||||
pub user_id: Uuid,
|
||||
pub profile_id: Uuid,
|
||||
}
|
||||
Reference in New Issue
Block a user