pub struct BoardDecisionUseCases { /* private fields */ }Expand description
Use cases pour la gestion des décisions du conseil de copropriété
Implementations§
Source§impl BoardDecisionUseCases
impl BoardDecisionUseCases
pub fn new( decision_repository: Arc<dyn BoardDecisionRepository>, building_repository: Arc<dyn BuildingRepository>, meeting_repository: Arc<dyn MeetingRepository>, ) -> Self
Sourcepub async fn create_decision(
&self,
dto: CreateBoardDecisionDto,
) -> Result<BoardDecisionResponseDto, String>
pub async fn create_decision( &self, dto: CreateBoardDecisionDto, ) -> Result<BoardDecisionResponseDto, String>
Crée une nouvelle décision à suivre suite à une AG
Sourcepub async fn get_decision(
&self,
id: Uuid,
) -> Result<BoardDecisionResponseDto, String>
pub async fn get_decision( &self, id: Uuid, ) -> Result<BoardDecisionResponseDto, String>
Récupère une décision par ID
Sourcepub async fn list_decisions_by_building(
&self,
building_id: Uuid,
) -> Result<Vec<BoardDecisionResponseDto>, String>
pub async fn list_decisions_by_building( &self, building_id: Uuid, ) -> Result<Vec<BoardDecisionResponseDto>, String>
Liste toutes les décisions d’un immeuble
Sourcepub async fn list_decisions_by_status(
&self,
building_id: Uuid,
status: &str,
) -> Result<Vec<BoardDecisionResponseDto>, String>
pub async fn list_decisions_by_status( &self, building_id: Uuid, status: &str, ) -> Result<Vec<BoardDecisionResponseDto>, String>
Liste les décisions avec un statut donné
Sourcepub async fn list_overdue_decisions(
&self,
building_id: Uuid,
) -> Result<Vec<BoardDecisionResponseDto>, String>
pub async fn list_overdue_decisions( &self, building_id: Uuid, ) -> Result<Vec<BoardDecisionResponseDto>, String>
Liste les décisions en retard
Sourcepub async fn update_decision_status(
&self,
id: Uuid,
dto: UpdateBoardDecisionDto,
) -> Result<BoardDecisionResponseDto, String>
pub async fn update_decision_status( &self, id: Uuid, dto: UpdateBoardDecisionDto, ) -> Result<BoardDecisionResponseDto, String>
Met à jour le statut d’une décision
Sourcepub async fn add_notes(
&self,
id: Uuid,
dto: AddDecisionNotesDto,
) -> Result<BoardDecisionResponseDto, String>
pub async fn add_notes( &self, id: Uuid, dto: AddDecisionNotesDto, ) -> Result<BoardDecisionResponseDto, String>
Ajoute des notes à une décision
Sourcepub async fn complete_decision(
&self,
id: Uuid,
) -> Result<BoardDecisionResponseDto, String>
pub async fn complete_decision( &self, id: Uuid, ) -> Result<BoardDecisionResponseDto, String>
Marque une décision comme complétée
Sourcepub async fn get_decision_stats(
&self,
building_id: Uuid,
) -> Result<DecisionStatsDto, String>
pub async fn get_decision_stats( &self, building_id: Uuid, ) -> Result<DecisionStatsDto, String>
Obtient des statistiques sur les décisions d’un immeuble
Auto Trait Implementations§
impl Freeze for BoardDecisionUseCases
impl !RefUnwindSafe for BoardDecisionUseCases
impl Send for BoardDecisionUseCases
impl Sync for BoardDecisionUseCases
impl Unpin for BoardDecisionUseCases
impl !UnwindSafe for BoardDecisionUseCases
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.