about summary refs log tree commit diff stats
path: root/crates/rocie-cli/src/cli.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-11-28 16:35:11 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-11-28 16:35:11 +0100
commit5dd3eb56474bc9106df764b5f46625c0787a4ba2 (patch)
tree319367f617f264bd61f327e4ea3c41c83deb1f96 /crates/rocie-cli/src/cli.rs
parentfeat(crates/rocie-server): Get closer to feature parity between rocie and grocy (diff)
downloadserver-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.rs29
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 {