AgeRequest

Struct AgeRequest 

Source
pub struct AgeRequest {
Show 21 fields pub id: Uuid, pub organization_id: Uuid, pub building_id: Uuid, pub title: String, pub description: Option<String>, pub status: AgeRequestStatus, pub created_by: Uuid, pub cosignatories: Vec<AgeRequestCosignatory>, pub total_shares_pct: f64, pub threshold_pct: f64, pub threshold_reached: bool, pub threshold_reached_at: Option<DateTime<Utc>>, pub submitted_to_syndic_at: Option<DateTime<Utc>>, pub syndic_deadline_at: Option<DateTime<Utc>>, pub syndic_response_at: Option<DateTime<Utc>>, pub syndic_notes: Option<String>, pub auto_convocation_triggered: bool, pub meeting_id: Option<Uuid>, pub concertation_poll_id: Option<Uuid>, pub created_at: DateTime<Utc>, pub updated_at: DateTime<Utc>,
}
Expand description

Demande d’Assemblée Générale Extraordinaire par les copropriétaires

Art. 3.87 §2 Code Civil Belge : “Tout copropriétaire peut demander au syndic de convoquer une assemblée générale. Si la demande émane d’un ou de plusieurs copropriétaires représentant au moins un cinquième des quotes-parts dans les parties communes, le syndic est tenu de convoquer cette assemblée.”

Délai syndic : 15 jours pour répondre/agir, sinon les demandeurs peuvent convoquer eux-mêmes l’assemblée.

Fields§

§id: Uuid§organization_id: Uuid§building_id: Uuid§title: String

Objet/titre de la demande d’AGE

§description: Option<String>

Description détaillée des raisons de la demande

§status: AgeRequestStatus

Statut courant de la demande

§created_by: Uuid

Copropriétaire initiateur

§cosignatories: Vec<AgeRequestCosignatory>

Liste des cosignataires

§total_shares_pct: f64

Total des quotes-parts des cosignataires (0.0 à 1.0)

§threshold_pct: f64

Seuil légal à atteindre (0.2 = 20% = 1/5, Art. 3.87 §2)

§threshold_reached: bool

Seuil atteint ?

§threshold_reached_at: Option<DateTime<Utc>>

Date à laquelle le seuil a été atteint

§submitted_to_syndic_at: Option<DateTime<Utc>>

Date de soumission formelle au syndic

§syndic_deadline_at: Option<DateTime<Utc>>

Délai imparti au syndic (soumission + 15j)

§syndic_response_at: Option<DateTime<Utc>>

Date de réponse du syndic

§syndic_notes: Option<String>

Notes du syndic (raison d’acceptation, de refus, etc.)

§auto_convocation_triggered: bool

Auto-convocation déclenchée car syndic inactif > 15j

§meeting_id: Option<Uuid>

Réunion AG convoquée (set lors de l’acceptation ou l’expiration)

§concertation_poll_id: Option<Uuid>

Sondage de concertation pré-AGE (lien vers Poll)

§created_at: DateTime<Utc>§updated_at: DateTime<Utc>

Implementations§

Source§

impl AgeRequest

Source

pub const SYNDIC_DEADLINE_DAYS: i64 = 15

Délai légal accordé au syndic pour agir (Art. 3.87 §2 CC)

Source

pub const DEFAULT_THRESHOLD_PCT: f64 = 0.20

Seuil légal : 1/5 des quotes-parts (Art. 3.87 §2 CC)

Source

pub fn new( organization_id: Uuid, building_id: Uuid, title: String, description: Option<String>, created_by: Uuid, ) -> Result<Self, String>

Crée une nouvelle demande d’AGE

Source

pub fn open(&mut self) -> Result<(), String>

Ouvre la demande pour signatures publiques (Draft → Open)

Source

pub fn add_cosignatory( &mut self, owner_id: Uuid, shares_pct: f64, ) -> Result<bool, String>

Ajoute un cosignataire et recalcule le total des quotes-parts Retourne true si le seuil 1/5 vient d’être atteint

Source

pub fn remove_cosignatory(&mut self, owner_id: Uuid) -> Result<(), String>

Retire un cosignataire et recalcule le total

Source

pub fn submit_to_syndic(&mut self) -> Result<(), String>

Soumet formellement la demande au syndic (Reached → Submitted)

Source

pub fn accept_by_syndic(&mut self, notes: Option<String>) -> Result<(), String>

Syndic accepte la demande (Submitted → Accepted)

Source

pub fn reject_by_syndic(&mut self, reason: String) -> Result<(), String>

Syndic rejette la demande avec motif (Submitted → Rejected)

Source

pub fn trigger_auto_convocation(&mut self) -> Result<(), String>

Déclenche l’auto-convocation car le syndic n’a pas répondu dans le délai (Submitted → Expired)

Source

pub fn withdraw(&mut self, requester_id: Uuid) -> Result<(), String>

Retire la demande (tout état non terminal → Withdrawn)

Source

pub fn set_meeting(&mut self, meeting_id: Uuid)

Lie une réunion AG à cette demande

Source

pub fn set_concertation_poll(&mut self, poll_id: Uuid)

Lie un sondage de concertation pré-AGE à cette demande

Source

pub fn is_deadline_expired(&self) -> bool

Vérifie si le délai syndic est dépassé

Source

pub fn shares_pct_missing(&self) -> f64

Retourne le pourcentage manquant pour atteindre le seuil (0.0 si déjà atteint)

Source

pub fn calculate_progress_percentage(&self, _building_total_shares: f64) -> f64

Calcule le progrès vers le seuil 1/5 en pourcentage (0-100%)

Exemple : Si 10% des quotes-parts ont signé et le seuil est 20%, retourne 50.0 (50% du chemin vers le seuil).

§Arguments
  • building_total_shares - Total des quotes-parts du bâtiment (normalement 1.0)
§Returns

Pourcentage de progression : 0.0 (0%) à 100.0 (seuil atteint ou dépassé)

Trait Implementations§

Source§

impl Clone for AgeRequest

Source§

fn clone(&self) -> AgeRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgeRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AgeRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&AgeRequest> for AgeRequestResponseDto

Source§

fn from(r: &AgeRequest) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for AgeRequest

Source§

fn eq(&self, other: &AgeRequest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for AgeRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AgeRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Chain<T> for T

§

fn len(&self) -> usize

The number of items that this chain link consists of.
§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Container<T> for T
where T: Clone,

§

type Iter = Once<T>

An iterator over the items within this container, by value.
§

fn get_iter(&self) -> <T as Container<T>>::Iter

Iterate over the elements of the container (using internal iteration because GATs are unstable).
§

impl<T> Fake for T

§

fn fake<U>(&self) -> U
where Self: FakeBase<U>,

§

fn fake_with_rng<U, R>(&self, rng: &mut R) -> U
where R: RngExt + ?Sized, Self: FakeBase<U>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> OrderedContainer<T> for T
where T: Clone,