doc
This commit is contained in:
parent
4de834b385
commit
fa9f394070
1 changed files with 11 additions and 4 deletions
15
src/item.rs
15
src/item.rs
|
@ -365,10 +365,17 @@ impl Variant {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
// case: import
|
/// Records a supply transaction in the database.
|
||||||
// made / bought an item -> supply
|
///
|
||||||
// check in with attrs -> uuid (transaction)
|
/// # Arguments
|
||||||
// commited to db
|
///
|
||||||
|
/// * `amount` - The quantity of items supplied.
|
||||||
|
/// * `price` - The price of the supplied items.
|
||||||
|
/// * `origin` - The origin or source of the supplied items.
|
||||||
|
///
|
||||||
|
/// # Returns
|
||||||
|
///
|
||||||
|
/// Returns a UUID string representing the transaction.
|
||||||
pub async fn supply(&self, amount: usize, price: Price, origin: &str) -> String {
|
pub async fn supply(&self, amount: usize, price: Price, origin: &str) -> String {
|
||||||
let db = get_mongo!();
|
let db = get_mongo!();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue