pub struct QuoteUseCases { /* private fields */ }Implementations§
Source§impl QuoteUseCases
impl QuoteUseCases
pub fn new(repository: Arc<dyn QuoteRepository>) -> Self
Sourcepub async fn create_quote(
&self,
dto: CreateQuoteDto,
) -> Result<QuoteResponseDto, String>
pub async fn create_quote( &self, dto: CreateQuoteDto, ) -> Result<QuoteResponseDto, String>
Create new quote request (Syndic action)
Sourcepub async fn submit_quote(
&self,
quote_id: Uuid,
) -> Result<QuoteResponseDto, String>
pub async fn submit_quote( &self, quote_id: Uuid, ) -> Result<QuoteResponseDto, String>
Submit quote (Contractor action)
Sourcepub async fn start_review(
&self,
quote_id: Uuid,
) -> Result<QuoteResponseDto, String>
pub async fn start_review( &self, quote_id: Uuid, ) -> Result<QuoteResponseDto, String>
Start quote review (Syndic action)
Sourcepub async fn accept_quote(
&self,
quote_id: Uuid,
decision_by: Uuid,
dto: QuoteDecisionDto,
) -> Result<QuoteResponseDto, String>
pub async fn accept_quote( &self, quote_id: Uuid, decision_by: Uuid, dto: QuoteDecisionDto, ) -> Result<QuoteResponseDto, String>
Accept quote (Syndic action - winner)
Sourcepub async fn reject_quote(
&self,
quote_id: Uuid,
decision_by: Uuid,
dto: QuoteDecisionDto,
) -> Result<QuoteResponseDto, String>
pub async fn reject_quote( &self, quote_id: Uuid, decision_by: Uuid, dto: QuoteDecisionDto, ) -> Result<QuoteResponseDto, String>
Reject quote (Syndic action - loser or unqualified)
Sourcepub async fn withdraw_quote(
&self,
quote_id: Uuid,
) -> Result<QuoteResponseDto, String>
pub async fn withdraw_quote( &self, quote_id: Uuid, ) -> Result<QuoteResponseDto, String>
Withdraw quote (Contractor action)
Sourcepub async fn compare_quotes(
&self,
dto: QuoteComparisonRequestDto,
) -> Result<QuoteComparisonResponseDto, String>
pub async fn compare_quotes( &self, dto: QuoteComparisonRequestDto, ) -> Result<QuoteComparisonResponseDto, String>
Compare multiple quotes (Belgian legal requirement: 3 quotes minimum for works >5000€) Returns quotes sorted by total score (best first)
Sourcepub async fn get_quote(
&self,
quote_id: Uuid,
) -> Result<Option<QuoteResponseDto>, String>
pub async fn get_quote( &self, quote_id: Uuid, ) -> Result<Option<QuoteResponseDto>, String>
Get quote by ID
Sourcepub async fn list_by_building(
&self,
building_id: Uuid,
) -> Result<Vec<QuoteResponseDto>, String>
pub async fn list_by_building( &self, building_id: Uuid, ) -> Result<Vec<QuoteResponseDto>, String>
List quotes by building
Sourcepub async fn list_by_contractor(
&self,
contractor_id: Uuid,
) -> Result<Vec<QuoteResponseDto>, String>
pub async fn list_by_contractor( &self, contractor_id: Uuid, ) -> Result<Vec<QuoteResponseDto>, String>
List quotes by contractor
Sourcepub async fn list_by_status(
&self,
building_id: Uuid,
status: &str,
) -> Result<Vec<QuoteResponseDto>, String>
pub async fn list_by_status( &self, building_id: Uuid, status: &str, ) -> Result<Vec<QuoteResponseDto>, String>
List quotes by status
Sourcepub async fn list_by_project_title(
&self,
building_id: Uuid,
project_title: &str,
) -> Result<Vec<QuoteResponseDto>, String>
pub async fn list_by_project_title( &self, building_id: Uuid, project_title: &str, ) -> Result<Vec<QuoteResponseDto>, String>
List quotes by project title
Sourcepub async fn update_contractor_rating(
&self,
quote_id: Uuid,
rating: i32,
) -> Result<QuoteResponseDto, String>
pub async fn update_contractor_rating( &self, quote_id: Uuid, rating: i32, ) -> Result<QuoteResponseDto, String>
Update contractor rating (for scoring)
Sourcepub async fn mark_expired_quotes(&self) -> Result<usize, String>
pub async fn mark_expired_quotes(&self) -> Result<usize, String>
Mark expired quotes (background job) Returns count of quotes marked as expired
Auto Trait Implementations§
impl Freeze for QuoteUseCases
impl !RefUnwindSafe for QuoteUseCases
impl Send for QuoteUseCases
impl Sync for QuoteUseCases
impl Unpin for QuoteUseCases
impl !UnwindSafe for QuoteUseCases
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.