importer feature
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use chrono::NaiveDateTime;
|
||||
use domain::models::{ExportFormat, UserRole};
|
||||
use importer::FieldMapping;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub struct LogReviewCommand {
|
||||
@@ -42,3 +43,44 @@ pub struct ExportCommand {
|
||||
pub user_id: Uuid,
|
||||
pub format: ExportFormat,
|
||||
}
|
||||
|
||||
pub enum FileFormat {
|
||||
Csv,
|
||||
Json,
|
||||
Xlsx,
|
||||
}
|
||||
|
||||
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