pub struct WorkReport {Show 19 fields
pub id: Uuid,
pub organization_id: Uuid,
pub building_id: Uuid,
pub title: String,
pub description: String,
pub work_type: WorkType,
pub contractor_name: String,
pub contractor_contact: Option<String>,
pub work_date: DateTime<Utc>,
pub completion_date: Option<DateTime<Utc>>,
pub cost: f64,
pub invoice_number: Option<String>,
pub photos: Vec<String>,
pub documents: Vec<String>,
pub notes: Option<String>,
pub warranty_type: WarrantyType,
pub warranty_expiry: DateTime<Utc>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Work Report - Rapport de travaux effectués
Tracks maintenance work, repairs, and renovations performed on the building. Part of the digital maintenance logbook (Carnet d’Entretien).
Fields§
§id: Uuid§organization_id: Uuid§building_id: Uuid§title: String§description: String§work_type: WorkType§contractor_name: String§contractor_contact: Option<String>§work_date: DateTime<Utc>§completion_date: Option<DateTime<Utc>>§cost: f64§invoice_number: Option<String>§photos: Vec<String>§documents: Vec<String>§notes: Option<String>§warranty_type: WarrantyType§warranty_expiry: DateTime<Utc>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl WorkReport
impl WorkReport
pub fn new( organization_id: Uuid, building_id: Uuid, title: String, description: String, work_type: WorkType, contractor_name: String, work_date: DateTime<Utc>, cost: f64, warranty_type: WarrantyType, ) -> Self
Sourcepub fn is_warranty_valid(&self) -> bool
pub fn is_warranty_valid(&self) -> bool
Check if warranty is still valid
Sourcepub fn warranty_days_remaining(&self) -> i64
pub fn warranty_days_remaining(&self) -> i64
Get remaining warranty days
Sourcepub fn add_document(&mut self, document_path: String)
pub fn add_document(&mut self, document_path: String)
Add document to work report
Trait Implementations§
Source§impl Clone for WorkReport
impl Clone for WorkReport
Source§fn clone(&self) -> WorkReport
fn clone(&self) -> WorkReport
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 WorkReport
impl Debug for WorkReport
Source§impl<'de> Deserialize<'de> for WorkReport
impl<'de> Deserialize<'de> for WorkReport
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 WorkReport
impl PartialEq for WorkReport
Source§impl Serialize for WorkReport
impl Serialize for WorkReport
impl StructuralPartialEq for WorkReport
Auto Trait Implementations§
impl Freeze for WorkReport
impl RefUnwindSafe for WorkReport
impl Send for WorkReport
impl Sync for WorkReport
impl Unpin for WorkReport
impl UnwindSafe for WorkReport
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.