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: StringObjet/titre de la demande d’AGE
description: Option<String>Description détaillée des raisons de la demande
status: AgeRequestStatusStatut courant de la demande
created_by: UuidCopropriétaire initiateur
cosignatories: Vec<AgeRequestCosignatory>Liste des cosignataires
Total des quotes-parts des cosignataires (0.0 à 1.0)
threshold_pct: f64Seuil légal à atteindre (0.2 = 20% = 1/5, Art. 3.87 §2)
threshold_reached: boolSeuil 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: boolAuto-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
impl AgeRequest
Sourcepub const SYNDIC_DEADLINE_DAYS: i64 = 15
pub const SYNDIC_DEADLINE_DAYS: i64 = 15
Délai légal accordé au syndic pour agir (Art. 3.87 §2 CC)
Sourcepub const DEFAULT_THRESHOLD_PCT: f64 = 0.20
pub const DEFAULT_THRESHOLD_PCT: f64 = 0.20
Seuil légal : 1/5 des quotes-parts (Art. 3.87 §2 CC)
Sourcepub fn new(
organization_id: Uuid,
building_id: Uuid,
title: String,
description: Option<String>,
created_by: Uuid,
) -> Result<Self, String>
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
Sourcepub fn open(&mut self) -> Result<(), String>
pub fn open(&mut self) -> Result<(), String>
Ouvre la demande pour signatures publiques (Draft → Open)
Sourcepub fn add_cosignatory(
&mut self,
owner_id: Uuid,
shares_pct: f64,
) -> Result<bool, String>
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
Sourcepub fn remove_cosignatory(&mut self, owner_id: Uuid) -> Result<(), String>
pub fn remove_cosignatory(&mut self, owner_id: Uuid) -> Result<(), String>
Retire un cosignataire et recalcule le total
Sourcepub fn submit_to_syndic(&mut self) -> Result<(), String>
pub fn submit_to_syndic(&mut self) -> Result<(), String>
Soumet formellement la demande au syndic (Reached → Submitted)
Sourcepub fn accept_by_syndic(&mut self, notes: Option<String>) -> Result<(), String>
pub fn accept_by_syndic(&mut self, notes: Option<String>) -> Result<(), String>
Syndic accepte la demande (Submitted → Accepted)
Sourcepub fn reject_by_syndic(&mut self, reason: String) -> Result<(), String>
pub fn reject_by_syndic(&mut self, reason: String) -> Result<(), String>
Syndic rejette la demande avec motif (Submitted → Rejected)
Sourcepub fn trigger_auto_convocation(&mut self) -> Result<(), String>
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)
Sourcepub fn withdraw(&mut self, requester_id: Uuid) -> Result<(), String>
pub fn withdraw(&mut self, requester_id: Uuid) -> Result<(), String>
Retire la demande (tout état non terminal → Withdrawn)
Sourcepub fn set_meeting(&mut self, meeting_id: Uuid)
pub fn set_meeting(&mut self, meeting_id: Uuid)
Lie une réunion AG à cette demande
Sourcepub fn set_concertation_poll(&mut self, poll_id: Uuid)
pub fn set_concertation_poll(&mut self, poll_id: Uuid)
Lie un sondage de concertation pré-AGE à cette demande
Sourcepub fn is_deadline_expired(&self) -> bool
pub fn is_deadline_expired(&self) -> bool
Vérifie si le délai syndic est dépassé
Retourne le pourcentage manquant pour atteindre le seuil (0.0 si déjà atteint)
Sourcepub fn calculate_progress_percentage(&self, _building_total_shares: f64) -> f64
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
impl Clone for AgeRequest
Source§fn clone(&self) -> AgeRequest
fn clone(&self) -> AgeRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgeRequest
impl Debug for AgeRequest
Source§impl<'de> Deserialize<'de> for AgeRequest
impl<'de> Deserialize<'de> for AgeRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&AgeRequest> for AgeRequestResponseDto
impl From<&AgeRequest> for AgeRequestResponseDto
Source§fn from(r: &AgeRequest) -> Self
fn from(r: &AgeRequest) -> Self
Source§impl PartialEq for AgeRequest
impl PartialEq for AgeRequest
Source§impl Serialize for AgeRequest
impl Serialize for AgeRequest
impl StructuralPartialEq for AgeRequest
Auto Trait Implementations§
impl Freeze for AgeRequest
impl RefUnwindSafe for AgeRequest
impl Send for AgeRequest
impl Sync for AgeRequest
impl Unpin for AgeRequest
impl UnwindSafe for AgeRequest
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
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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