use super::task_repository::RepositoryError;
use crate::domain::models::Webhook;
use async_trait::async_trait;
#[async_trait]
pub trait WebhookRepository: Send + Sync {
async fn create(&self, webhook: &Webhook) -> Result<Webhook, RepositoryError>;
async fn find_by_id(
&self,
id: crate::domain::id::Id,
) -> Result<Option<Webhook>, RepositoryError>;
async fn find_by_team_id(
&self,
team_id: crate::domain::id::Id,
) -> Result<Vec<Webhook>, RepositoryError>;
}