pub struct EtatDateUseCases { /* private fields */ }Implementations§
Source§impl EtatDateUseCases
impl EtatDateUseCases
pub fn new( repository: Arc<dyn EtatDateRepository>, unit_repository: Arc<dyn UnitRepository>, building_repository: Arc<dyn BuildingRepository>, unit_owner_repository: Arc<dyn UnitOwnerRepository>, ) -> Self
Sourcepub async fn create_etat_date(
&self,
request: CreateEtatDateRequest,
) -> Result<EtatDateResponse, String>
pub async fn create_etat_date( &self, request: CreateEtatDateRequest, ) -> Result<EtatDateResponse, String>
Create a new état daté request
Sourcepub async fn get_etat_date(
&self,
id: Uuid,
) -> Result<Option<EtatDateResponse>, String>
pub async fn get_etat_date( &self, id: Uuid, ) -> Result<Option<EtatDateResponse>, String>
Get état daté by ID
Sourcepub async fn get_by_reference_number(
&self,
reference_number: &str,
) -> Result<Option<EtatDateResponse>, String>
pub async fn get_by_reference_number( &self, reference_number: &str, ) -> Result<Option<EtatDateResponse>, String>
Get état daté by reference number
Sourcepub async fn list_by_unit(
&self,
unit_id: Uuid,
) -> Result<Vec<EtatDateResponse>, String>
pub async fn list_by_unit( &self, unit_id: Uuid, ) -> Result<Vec<EtatDateResponse>, String>
List états datés for a unit
Sourcepub async fn list_by_building(
&self,
building_id: Uuid,
) -> Result<Vec<EtatDateResponse>, String>
pub async fn list_by_building( &self, building_id: Uuid, ) -> Result<Vec<EtatDateResponse>, String>
List états datés for a building
Sourcepub async fn list_paginated(
&self,
page_request: &PageRequest,
organization_id: Option<Uuid>,
status: Option<EtatDateStatus>,
) -> Result<(Vec<EtatDateResponse>, i64), String>
pub async fn list_paginated( &self, page_request: &PageRequest, organization_id: Option<Uuid>, status: Option<EtatDateStatus>, ) -> Result<(Vec<EtatDateResponse>, i64), String>
List états datés paginated
Sourcepub async fn mark_in_progress(
&self,
id: Uuid,
) -> Result<EtatDateResponse, String>
pub async fn mark_in_progress( &self, id: Uuid, ) -> Result<EtatDateResponse, String>
Mark état daté as in progress
Sourcepub async fn mark_generated(
&self,
id: Uuid,
pdf_file_path: String,
) -> Result<EtatDateResponse, String>
pub async fn mark_generated( &self, id: Uuid, pdf_file_path: String, ) -> Result<EtatDateResponse, String>
Mark état daté as generated (with PDF file path)
Sourcepub async fn mark_delivered(&self, id: Uuid) -> Result<EtatDateResponse, String>
pub async fn mark_delivered(&self, id: Uuid) -> Result<EtatDateResponse, String>
Mark état daté as delivered to notary
Sourcepub async fn update_financial_data(
&self,
id: Uuid,
request: UpdateEtatDateFinancialRequest,
) -> Result<EtatDateResponse, String>
pub async fn update_financial_data( &self, id: Uuid, request: UpdateEtatDateFinancialRequest, ) -> Result<EtatDateResponse, String>
Update financial data
Sourcepub async fn update_additional_data(
&self,
id: Uuid,
request: UpdateEtatDateAdditionalDataRequest,
) -> Result<EtatDateResponse, String>
pub async fn update_additional_data( &self, id: Uuid, request: UpdateEtatDateAdditionalDataRequest, ) -> Result<EtatDateResponse, String>
Update additional data (sections 7-16)
Sourcepub async fn list_overdue(
&self,
organization_id: Uuid,
) -> Result<Vec<EtatDateResponse>, String>
pub async fn list_overdue( &self, organization_id: Uuid, ) -> Result<Vec<EtatDateResponse>, String>
Get overdue états datés (>10 days, not generated yet)
Sourcepub async fn list_expired(
&self,
organization_id: Uuid,
) -> Result<Vec<EtatDateResponse>, String>
pub async fn list_expired( &self, organization_id: Uuid, ) -> Result<Vec<EtatDateResponse>, String>
Get expired états datés (>3 months from reference date)
Auto Trait Implementations§
impl Freeze for EtatDateUseCases
impl !RefUnwindSafe for EtatDateUseCases
impl Send for EtatDateUseCases
impl Sync for EtatDateUseCases
impl Unpin for EtatDateUseCases
impl !UnwindSafe for EtatDateUseCases
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.