pub struct CostTransaction {
pub id: Uuid,
pub sku: String,
pub transaction_type: CostTransactionType,
pub quantity: Decimal,
pub unit_cost: Decimal,
pub total_cost: Decimal,
pub layer_id: Option<Uuid>,
pub reference_type: Option<String>,
pub reference_id: Option<Uuid>,
pub notes: Option<String>,
pub created_at: DateTime<Utc>,
}Expand description
A cost transaction (records cost movements).
Fields§
§id: Uuid§sku: String§transaction_type: CostTransactionType§quantity: Decimal§unit_cost: Decimal§total_cost: Decimal§layer_id: Option<Uuid>§reference_type: Option<String>§reference_id: Option<Uuid>§notes: Option<String>§created_at: DateTime<Utc>Trait Implementations§
Source§impl Clone for CostTransaction
impl Clone for CostTransaction
Source§fn clone(&self) -> CostTransaction
fn clone(&self) -> CostTransaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CostTransaction
impl Debug for CostTransaction
Source§impl<'de> Deserialize<'de> for CostTransaction
impl<'de> Deserialize<'de> for CostTransaction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CostTransaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CostTransaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CostTransaction
impl Serialize for CostTransaction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CostTransaction
impl RefUnwindSafe for CostTransaction
impl Send for CostTransaction
impl Sync for CostTransaction
impl Unpin for CostTransaction
impl UnsafeUnpin for CostTransaction
impl UnwindSafe for CostTransaction
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