diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-28 16:35:11 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-28 16:35:11 +0100 |
| commit | 5dd3eb56474bc9106df764b5f46625c0787a4ba2 (patch) | |
| tree | 319367f617f264bd61f327e4ea3c41c83deb1f96 /crates/rocie-cli/src/cli.rs | |
| parent | feat(crates/rocie-server): Get closer to feature parity between rocie and grocy (diff) | |
| download | server-5dd3eb56474bc9106df764b5f46625c0787a4ba2.zip | |
feat(crates/rocie-cli): Add support for product parents
Diffstat (limited to 'crates/rocie-cli/src/cli.rs')
| -rw-r--r-- | crates/rocie-cli/src/cli.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/crates/rocie-cli/src/cli.rs b/crates/rocie-cli/src/cli.rs index a683306..626a7b1 100644 --- a/crates/rocie-cli/src/cli.rs +++ b/crates/rocie-cli/src/cli.rs @@ -15,6 +15,12 @@ pub(crate) enum Command { command: ProductCommand, }, + /// Deal with parents + Parents { + #[command(subcommand)] + command: ProductParentCommand, + }, + /// Deal with units Unit { #[command(subcommand)] @@ -35,6 +41,29 @@ pub(crate) enum Command { } #[derive(Subcommand)] +pub(crate) enum ProductParentCommand { + /// Register a new product parent + Register { + #[arg(short, long)] + name: String, + + /// Optional description of the new product parent + #[arg(short, long)] + description: Option<String>, + }, + + /// Fetch an product parent based on id + GetById { + /// The id of the product parent + #[arg(short, long)] + id: Uuid, + }, + + /// List all available product parents + List {}, +} + +#[derive(Subcommand)] pub(crate) enum UnitCommand { /// Register a new unit Register { |
