refactor: remove serde from domain entities for Clean Architecture compliance

- Remove Serialize/Deserialize from File, Folder, Session, User, Contact entities
- Create contact_persistence_dto.rs for JSONB persistence in infrastructure layer
- Update contact_pg_repository to use persistence DTOs
- Fix dependency on zip crate (downgrade from 7.2.0 to 2.1.0)
- Fix unused variable warnings in main.rs
- Move PathService import from domain to infrastructure
- Add missing fields to CoreServices and RepositoryServices
- Create proper service initialization in main.rs

Clean Architecture improvements:
- Domain layer no longer depends on serde framework
- Persistence concerns isolated to infrastructure layer
- TokenClaims in auth_service.rs is only exception (required for JWT)
This commit is contained in:
Dionisio
2026-02-02 23:56:40 +01:00
parent 6aceb07f3f
commit 52840e57df
88 changed files with 4286 additions and 4847 deletions
-6
View File
@@ -33,7 +33,6 @@ pub struct TimeoutConfig {
/// Timeout para adquisición de locks (ms)
pub lock_acquisition_ms: u64,
/// Timeout para operaciones de red (ms)
#[allow(dead_code)]
pub network_operation_ms: u64,
}
@@ -80,7 +79,6 @@ impl TimeoutConfig {
}
/// Obtiene un Duration para operaciones de red
#[allow(dead_code)]
pub fn network_timeout(&self) -> Duration {
Duration::from_millis(self.network_operation_ms)
}
@@ -92,7 +90,6 @@ pub struct ResourceConfig {
/// Umbral en MB para considerar un archivo como grande
pub large_file_threshold_mb: u64,
/// Umbral de entradas para considerar un directorio como grande
#[allow(dead_code)]
pub large_dir_threshold_entries: usize,
/// Tamaño de chunk para procesamiento de archivos grandes (bytes)
pub chunk_size_bytes: usize,
@@ -133,7 +130,6 @@ impl ResourceConfig {
}
/// Determina si un directorio es considerado grande
#[allow(dead_code)]
pub fn is_large_directory(&self, entry_count: usize) -> bool {
entry_count >= self.large_dir_threshold_entries
}
@@ -170,7 +166,6 @@ pub struct ConcurrencyConfig {
/// Máximo de tareas de archivo concurrentes
pub max_concurrent_files: usize,
/// Máximo de tareas de directorio concurrentes
#[allow(dead_code)]
pub max_concurrent_dirs: usize,
/// Máximo de operaciones de IO concurrentes
pub max_concurrent_io: usize,
@@ -451,7 +446,6 @@ impl AppConfig {
}
/// Obtenemos una configuración global por defecto
#[allow(dead_code)]
pub fn default_config() -> AppConfig {
AppConfig::default()
}