pub struct NewVisitRow<'a> {
pub id: Uuid,
pub asset_id: Uuid,
pub schedule_id: Option<Uuid>,
pub maintenance_type: &'a str,
pub warehouse_id: Option<Uuid>,
pub warranty_claim_id: Option<Uuid>,
pub scheduled_date: NaiveDate,
pub labor_cost: Decimal,
pub maintenance_expense_account_id: Uuid,
pub parts_inventory_account_id: Uuid,
pub labor_payable_account_id: Uuid,
}Expand description
The exact row a visit plan writes.
Mirrors the raw column shape rather than the MaintenanceVisit entity: maintenance_type binds as
&str and is cast at the DB ($5::maintenance_type), so a bad value fails as a DB error rather
than a deserialize panic. labor_cost is expected already money-rounded by the caller.
Fields§
§id: Uuid§asset_id: Uuid§schedule_id: Option<Uuid>§maintenance_type: &'a str§warehouse_id: Option<Uuid>§warranty_claim_id: Option<Uuid>§scheduled_date: NaiveDate§labor_cost: Decimal§maintenance_expense_account_id: Uuid§parts_inventory_account_id: Uuid§labor_payable_account_id: UuidAuto Trait Implementations§
impl<'a> Freeze for NewVisitRow<'a>
impl<'a> RefUnwindSafe for NewVisitRow<'a>
impl<'a> Send for NewVisitRow<'a>
impl<'a> Sync for NewVisitRow<'a>
impl<'a> Unpin for NewVisitRow<'a>
impl<'a> UnsafeUnpin for NewVisitRow<'a>
impl<'a> UnwindSafe for NewVisitRow<'a>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 more