pub struct BoardMemberUseCases { /* private fields */ }Implementations§
Source§impl BoardMemberUseCases
impl BoardMemberUseCases
pub fn new( repository: Arc<dyn BoardMemberRepository>, building_repository: Arc<dyn BuildingRepository>, ) -> Self
Sourcepub async fn elect_board_member(
&self,
dto: CreateBoardMemberDto,
) -> Result<BoardMemberResponseDto, String>
pub async fn elect_board_member( &self, dto: CreateBoardMemberDto, ) -> Result<BoardMemberResponseDto, String>
Élit un nouveau membre du conseil de copropriété Vérifie que l’immeuble a plus de 20 lots (obligation légale)
Sourcepub async fn get_board_member(
&self,
id: Uuid,
) -> Result<Option<BoardMemberResponseDto>, String>
pub async fn get_board_member( &self, id: Uuid, ) -> Result<Option<BoardMemberResponseDto>, String>
Obtient un membre du conseil par son ID
Sourcepub async fn list_active_board_members(
&self,
building_id: Uuid,
) -> Result<Vec<BoardMemberResponseDto>, String>
pub async fn list_active_board_members( &self, building_id: Uuid, ) -> Result<Vec<BoardMemberResponseDto>, String>
Liste tous les membres actifs du conseil pour un immeuble
Sourcepub async fn list_all_board_members(
&self,
building_id: Uuid,
) -> Result<Vec<BoardMemberResponseDto>, String>
pub async fn list_all_board_members( &self, building_id: Uuid, ) -> Result<Vec<BoardMemberResponseDto>, String>
Liste tous les membres du conseil (incluant historique) pour un immeuble
Sourcepub async fn renew_mandate(
&self,
id: Uuid,
dto: RenewMandateDto,
) -> Result<BoardMemberResponseDto, String>
pub async fn renew_mandate( &self, id: Uuid, dto: RenewMandateDto, ) -> Result<BoardMemberResponseDto, String>
Renouvelle le mandat d’un membre du conseil
Sourcepub async fn remove_board_member(&self, id: Uuid) -> Result<bool, String>
pub async fn remove_board_member(&self, id: Uuid) -> Result<bool, String>
Démissionne un membre du conseil (suppression)
Sourcepub async fn get_board_stats(
&self,
building_id: Uuid,
) -> Result<BoardStatsDto, String>
pub async fn get_board_stats( &self, building_id: Uuid, ) -> Result<BoardStatsDto, String>
Obtient les statistiques du conseil pour un immeuble
Auto Trait Implementations§
impl Freeze for BoardMemberUseCases
impl !RefUnwindSafe for BoardMemberUseCases
impl Send for BoardMemberUseCases
impl Sync for BoardMemberUseCases
impl Unpin for BoardMemberUseCases
impl !UnwindSafe for BoardMemberUseCases
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.