pub struct Convocation {Show 20 fields
pub id: Uuid,
pub organization_id: Uuid,
pub building_id: Uuid,
pub meeting_id: Uuid,
pub meeting_type: ConvocationType,
pub meeting_date: DateTime<Utc>,
pub status: ConvocationStatus,
pub minimum_send_date: DateTime<Utc>,
pub actual_send_date: Option<DateTime<Utc>>,
pub scheduled_send_date: Option<DateTime<Utc>>,
pub pdf_file_path: Option<String>,
pub language: String,
pub total_recipients: i32,
pub opened_count: i32,
pub will_attend_count: i32,
pub will_not_attend_count: i32,
pub reminder_sent_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub created_by: Uuid,
}Expand description
Convocation entity - Automatic meeting invitations with legal compliance
Implements Belgian copropriété legal requirements for meeting convocations:
- Ordinary AG: 15 days minimum notice
- Extraordinary AG: 8 days minimum notice
- Second convocation: 8 days minimum notice
Fields§
§id: Uuid§organization_id: Uuid§building_id: Uuid§meeting_id: Uuid§meeting_type: ConvocationType§meeting_date: DateTime<Utc>§status: ConvocationStatus§minimum_send_date: DateTime<Utc>§actual_send_date: Option<DateTime<Utc>>§scheduled_send_date: Option<DateTime<Utc>>§pdf_file_path: Option<String>§language: String§total_recipients: i32§opened_count: i32§will_attend_count: i32§will_not_attend_count: i32§reminder_sent_at: Option<DateTime<Utc>>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>§created_by: UuidImplementations§
Source§impl Convocation
impl Convocation
Sourcepub fn new(
organization_id: Uuid,
building_id: Uuid,
meeting_id: Uuid,
meeting_type: ConvocationType,
meeting_date: DateTime<Utc>,
language: String,
created_by: Uuid,
) -> Result<Self, String>
pub fn new( organization_id: Uuid, building_id: Uuid, meeting_id: Uuid, meeting_type: ConvocationType, meeting_date: DateTime<Utc>, language: String, created_by: Uuid, ) -> Result<Self, String>
Create a new convocation
§Arguments
organization_id- Organization IDbuilding_id- Building IDmeeting_id- Meeting IDmeeting_type- Type of meeting (Ordinary/Extraordinary/Second)meeting_date- Scheduled meeting datelanguage- Convocation language (FR/NL/DE/EN)created_by- User creating the convocation
§Returns
Result with Convocation or error if meeting date is too soon
Sourcepub fn schedule(&mut self, send_date: DateTime<Utc>) -> Result<(), String>
pub fn schedule(&mut self, send_date: DateTime<Utc>) -> Result<(), String>
Schedule convocation to be sent at specific date
Sourcepub fn mark_sent(
&mut self,
pdf_file_path: String,
total_recipients: i32,
) -> Result<(), String>
pub fn mark_sent( &mut self, pdf_file_path: String, total_recipients: i32, ) -> Result<(), String>
Mark convocation as sent
Sourcepub fn mark_reminder_sent(&mut self) -> Result<(), String>
pub fn mark_reminder_sent(&mut self) -> Result<(), String>
Mark reminder as sent (J-3)
Sourcepub fn update_tracking_counts(
&mut self,
opened_count: i32,
will_attend_count: i32,
will_not_attend_count: i32,
)
pub fn update_tracking_counts( &mut self, opened_count: i32, will_attend_count: i32, will_not_attend_count: i32, )
Update tracking counts from recipients
Sourcepub fn respects_legal_deadline(&self) -> bool
pub fn respects_legal_deadline(&self) -> bool
Check if convocation respects legal deadline
Sourcepub fn days_until_meeting(&self) -> i64
pub fn days_until_meeting(&self) -> i64
Get days until meeting
Sourcepub fn should_send_reminder(&self) -> bool
pub fn should_send_reminder(&self) -> bool
Check if reminder should be sent (3 days before meeting)
Sourcepub fn opening_rate(&self) -> f64
pub fn opening_rate(&self) -> f64
Get opening rate (percentage of recipients who opened)
Sourcepub fn attendance_rate(&self) -> f64
pub fn attendance_rate(&self) -> f64
Get attendance rate (percentage confirmed attending)
Trait Implementations§
Source§impl Clone for Convocation
impl Clone for Convocation
Source§fn clone(&self) -> Convocation
fn clone(&self) -> Convocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Convocation
impl Debug for Convocation
Source§impl<'de> Deserialize<'de> for Convocation
impl<'de> Deserialize<'de> for Convocation
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Convocation> for ConvocationResponse
impl From<Convocation> for ConvocationResponse
Source§fn from(convocation: Convocation) -> Self
fn from(convocation: Convocation) -> Self
Converts to this type from the input type.
Source§impl From<Convocation> for ConvocationSummaryResponse
impl From<Convocation> for ConvocationSummaryResponse
Source§fn from(convocation: Convocation) -> Self
fn from(convocation: Convocation) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Convocation
impl RefUnwindSafe for Convocation
impl Send for Convocation
impl Sync for Convocation
impl Unpin for Convocation
impl UnwindSafe for Convocation
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
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>
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.