diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-09-23 08:33:06 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-09-23 08:34:45 +0200 |
| commit | 2dc74d621399be454abbbff892fb46204ddc6e7b (patch) | |
| tree | f9525527fc09c465d4e2e4a4f665bfd444b889f8 /crates/rocie-cli/src/cli.rs | |
| parent | feat: Provide basic barcode handling support (diff) | |
| download | server-2dc74d621399be454abbbff892fb46204ddc6e7b.zip | |
feat(treewide): Add tests and barcode buying/consuming
Diffstat (limited to 'crates/rocie-cli/src/cli.rs')
| -rw-r--r-- | crates/rocie-cli/src/cli.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/crates/rocie-cli/src/cli.rs b/crates/rocie-cli/src/cli.rs index 3f2662b..29c284f 100644 --- a/crates/rocie-cli/src/cli.rs +++ b/crates/rocie-cli/src/cli.rs @@ -20,6 +20,12 @@ pub(crate) enum Command { #[command(subcommand)] command: UnitCommand, }, + + /// Deal with Barcodes + Barcode { + #[command(subcommand)] + command: BarcodeCommand, + }, } #[derive(Subcommand)] @@ -58,6 +64,32 @@ pub(crate) enum UnitCommand { } #[derive(Subcommand)] +#[expect(variant_size_differences, reason = "It's just a testing cli")] +pub(crate) enum BarcodeCommand { + /// Buy an barcode + Buy { + /// The numeric value of the barcode + #[arg(short, long)] + id: u32, + }, + + /// Consume an barcode + Consume { + /// The numeric value of the barcode + #[arg(short, long)] + id: u32, + + /// The amount to consume + #[arg(short, long)] + amount: u32, + + /// The unit of the consumed amount + #[arg(short, long)] + unit_id: Uuid, + }, +} + +#[derive(Subcommand)] pub(crate) enum ProductCommand { /// Register a new product Register { |
