add: single_use products

This commit is contained in:
trisua 2025-08-08 14:17:40 -04:00
parent 7fbc732290
commit e5e6d5cddb
12 changed files with 149 additions and 7 deletions

View file

@ -29,6 +29,8 @@ pub struct Product {
///
/// A negative stock means the product has unlimited stock.
pub stock: i32,
/// If this product is limited to one purchase per person.
pub single_use: bool,
}
impl Product {
@ -44,6 +46,7 @@ impl Product {
on_sale: false,
price: 0,
stock: 0,
single_use: true,
}
}
}