use async_trait::async_trait;
use uuid::Uuid;
use super::{errors::{{ pascal }}Error, model::{{ pascal }}};
#[async_trait]
pub trait {{ pascal }}RepositoryTrait: Send + Sync {
async fn find_by_id(&self, id: Uuid) -> Result<Option<{{ pascal }}>, {{ pascal }}Error>;
async fn save(&self, entity: &{{ pascal }}) -> Result<(), {{ pascal }}Error>;
}
#[cfg(any(test, feature = "test-utils"))]
pub mod mocks {
use mockall::mock;
use uuid::Uuid;
use super::*;
mock! {
pub {{ pascal }}Repository {}
#[async_trait]
impl {{ pascal }}RepositoryTrait for {{ pascal }}Repository {
async fn find_by_id(&self, id: Uuid) -> Result<Option<{{ pascal }}>, {{ pascal }}Error>;
async fn save(&self, entity: &{{ pascal }}) -> Result<(), {{ pascal }}Error>;
}
}
}