koprogo_api/application/ports/
owner_contribution_repository.rs1use crate::domain::entities::OwnerContribution;
2use async_trait::async_trait;
3use uuid::Uuid;
4
5#[async_trait]
6pub trait OwnerContributionRepository: Send + Sync {
7 async fn create(&self, contribution: &OwnerContribution) -> Result<OwnerContribution, String>;
8 async fn find_by_id(&self, id: Uuid) -> Result<Option<OwnerContribution>, String>;
9 async fn find_by_organization(
10 &self,
11 organization_id: Uuid,
12 ) -> Result<Vec<OwnerContribution>, String>;
13 async fn find_by_owner(&self, owner_id: Uuid) -> Result<Vec<OwnerContribution>, String>;
14 async fn update(&self, contribution: &OwnerContribution) -> Result<OwnerContribution, String>;
15}