pub struct TechnicalInspection {Show 26 fields
pub id: Uuid,
pub organization_id: Uuid,
pub building_id: Uuid,
pub inspection_type: InspectionType,
pub title: String,
pub description: Option<String>,
pub inspector_name: String,
pub inspector_company: Option<String>,
pub inspector_certification: Option<String>,
pub inspection_date: DateTime<Utc>,
pub next_due_date: DateTime<Utc>,
pub status: InspectionStatus,
pub result_summary: Option<String>,
pub defects_found: Option<String>,
pub recommendations: Option<String>,
pub compliant: Option<bool>,
pub compliance_certificate_number: Option<String>,
pub compliance_valid_until: Option<DateTime<Utc>>,
pub cost: Option<f64>,
pub invoice_number: Option<String>,
pub reports: Vec<String>,
pub photos: Vec<String>,
pub certificates: Vec<String>,
pub notes: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Technical Inspection - Inspection technique obligatoire
Tracks mandatory technical inspections for building equipment and systems. Belgian law requires regular inspections for safety-critical equipment.
Fields§
§id: Uuid§organization_id: Uuid§building_id: Uuid§inspection_type: InspectionType§title: String§description: Option<String>§inspector_name: String§inspector_company: Option<String>§inspector_certification: Option<String>§inspection_date: DateTime<Utc>§next_due_date: DateTime<Utc>§status: InspectionStatus§result_summary: Option<String>§defects_found: Option<String>§recommendations: Option<String>§compliant: Option<bool>§compliance_certificate_number: Option<String>§compliance_valid_until: Option<DateTime<Utc>>§cost: Option<f64>§invoice_number: Option<String>§reports: Vec<String>§photos: Vec<String>§certificates: Vec<String>§notes: Option<String>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl TechnicalInspection
impl TechnicalInspection
pub fn new( organization_id: Uuid, building_id: Uuid, title: String, description: Option<String>, inspection_type: InspectionType, inspector_name: String, inspection_date: DateTime<Utc>, ) -> Self
Sourcepub fn calculate_next_due_date(&self) -> DateTime<Utc>
pub fn calculate_next_due_date(&self) -> DateTime<Utc>
Calculate next due date based on inspection type
Sourcepub fn is_overdue(&self) -> bool
pub fn is_overdue(&self) -> bool
Check if inspection is overdue
Sourcepub fn days_until_due(&self) -> i64
pub fn days_until_due(&self) -> i64
Get days until next inspection is due (negative if overdue)
Sourcepub fn mark_overdue(&mut self)
pub fn mark_overdue(&mut self)
Mark as overdue
Sourcepub fn add_report(&mut self, report_path: String)
pub fn add_report(&mut self, report_path: String)
Add report to inspection
Sourcepub fn add_certificate(&mut self, certificate_path: String)
pub fn add_certificate(&mut self, certificate_path: String)
Add certificate to inspection
Trait Implementations§
Source§impl Clone for TechnicalInspection
impl Clone for TechnicalInspection
Source§fn clone(&self) -> TechnicalInspection
fn clone(&self) -> TechnicalInspection
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 TechnicalInspection
impl Debug for TechnicalInspection
Source§impl<'de> Deserialize<'de> for TechnicalInspection
impl<'de> Deserialize<'de> for TechnicalInspection
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 PartialEq for TechnicalInspection
impl PartialEq for TechnicalInspection
Source§impl Serialize for TechnicalInspection
impl Serialize for TechnicalInspection
impl StructuralPartialEq for TechnicalInspection
Auto Trait Implementations§
impl Freeze for TechnicalInspection
impl RefUnwindSafe for TechnicalInspection
impl Send for TechnicalInspection
impl Sync for TechnicalInspection
impl Unpin for TechnicalInspection
impl UnwindSafe for TechnicalInspection
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.