16
crates/domain/src/ports/rejection.rs
Normal file
16
crates/domain/src/ports/rejection.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use crate::errors::DomainError;
|
||||
use crate::rejection::RejectedMetric;
|
||||
use crate::user::UserId;
|
||||
|
||||
#[async_trait::async_trait]
|
||||
pub trait RejectionCommandPort: Send + Sync {
|
||||
async fn record(&self, rejections: &[RejectedMetric]) -> Result<(), DomainError>;
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
pub trait RejectionQueryPort: Send + Sync {
|
||||
async fn find_recent_by_user(
|
||||
&self,
|
||||
user_id: &UserId,
|
||||
) -> Result<Vec<RejectedMetric>, DomainError>;
|
||||
}
|
||||
Reference in New Issue
Block a user