pub struct PostgresUnitOwnerRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl UnitOwnerRepository for PostgresUnitOwnerRepository
impl UnitOwnerRepository for PostgresUnitOwnerRepository
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
unit_owner: &'life1 UnitOwner,
) -> Pin<Box<dyn Future<Output = Result<UnitOwner, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
unit_owner: &'life1 UnitOwner,
) -> Pin<Box<dyn Future<Output = Result<UnitOwner, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new unit-owner relationship
Source§fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find a unit-owner relationship by ID
Source§fn find_current_owners_by_unit<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_current_owners_by_unit<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all current owners of a unit (end_date IS NULL)
Source§fn find_current_units_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_current_units_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all current units of an owner (end_date IS NULL)
Source§fn find_all_owners_by_unit<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_all_owners_by_unit<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get ownership history of a unit (including past owners)
Source§fn find_all_units_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_all_units_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get ownership history of an owner (including past units)
Source§fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
unit_owner: &'life1 UnitOwner,
) -> Pin<Box<dyn Future<Output = Result<UnitOwner, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
unit_owner: &'life1 UnitOwner,
) -> Pin<Box<dyn Future<Output = Result<UnitOwner, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update a unit-owner relationship
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a unit-owner relationship
Source§fn has_active_owners<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_active_owners<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if a unit has any active owners
Source§fn get_total_ownership_percentage<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Decimal, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_ownership_percentage<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Decimal, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the total ownership percentage for a unit (should be <= 1.0)
Source§fn find_active_by_unit_and_owner<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_active_by_unit_and_owner<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<UnitOwner>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find active unit-owner relationship by unit and owner IDs
Source§fn find_active_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Uuid, Uuid, Decimal)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_active_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Uuid, Uuid, Decimal)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all active unit-owner relationships for a building
Returns tuples of (unit_id, owner_id, ownership_percentage)
Useful for calculating charge distributions
Détentions actives d’un immeuble, avec le pourcentage BRUT de détention
dans le lot (
unit_owners.ownership_percentage). Read moreQuotes-parts de CHARGE des détenteurs actifs d’un immeuble. Read more
Source§fn find_voting_holders_by_unit<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<LotHolder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_voting_holders_by_unit<'life0, 'async_trait>(
&'life0 self,
unit_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<LotHolder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Story H17 (Art. 3.87 §1 CC) — titularités actives d’un lot réduites aux
attributs pertinents pour le calcul du droit de vote (
ownership_type Read moreSource§fn is_voting_representative<'life0, 'async_trait>(
&'life0 self,
unit_owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_voting_representative<'life0, 'async_trait>(
&'life0 self,
unit_owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Story #848 (Art. 3.87 §1 CC) — la ligne
unit_owners identifiée
porte-t-elle déjà la désignation de représentant de vote ? Sert à
rendre la désignation idempotente : redésigner le représentant déjà en
place ne doit pas se heurter à la règle du représentant unique contre
elle-même (assert_single_voting_representative).Source§fn set_voting_representative<'life0, 'async_trait>(
&'life0 self,
unit_owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_voting_representative<'life0, 'async_trait>(
&'life0 self,
unit_owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Story #848 (Art. 3.87 §1 CC) — écrit la désignation du représentant de
vote pour une ligne
unit_owners précise. L’appelant DOIT avoir validé
assert_single_voting_representative sur l’état prospectif AVANT
d’appeler cette méthode : elle écrit, elle ne contrôle rien (cf.
UnitOwnerUseCases::designate_voting_representative).Auto Trait Implementations§
impl !RefUnwindSafe for PostgresUnitOwnerRepository
impl !UnwindSafe for PostgresUnitOwnerRepository
impl Freeze for PostgresUnitOwnerRepository
impl Send for PostgresUnitOwnerRepository
impl Sync for PostgresUnitOwnerRepository
impl Unpin for PostgresUnitOwnerRepository
impl UnsafeUnpin for PostgresUnitOwnerRepository
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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.