refactoring hexagonal architecture
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
use thiserror::Error;
|
||||
use uuid::Uuid;
|
||||
|
||||
// Re-exportar errores de entidad desde el módulo centralizado
|
||||
pub use super::entity_errors::ShareError;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Share {
|
||||
pub id: String,
|
||||
@@ -29,16 +31,6 @@ pub enum ShareItemType {
|
||||
Folder,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ShareError {
|
||||
#[error("Invalid token: {0}")]
|
||||
InvalidToken(String),
|
||||
#[error("Invalid expiration date: {0}")]
|
||||
InvalidExpiration(String),
|
||||
#[error("Validation error: {0}")]
|
||||
ValidationError(String),
|
||||
}
|
||||
|
||||
impl Share {
|
||||
pub fn new(
|
||||
item_id: String,
|
||||
|
||||
Reference in New Issue
Block a user