aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/src')
-rw-r--r--common/src/user.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/src/user.rs b/common/src/user.rs
index f33ca71..8807772 100644
--- a/common/src/user.rs
+++ b/common/src/user.rs
@@ -14,6 +14,19 @@ pub struct User {
pub permissions: PermissionSet,
}
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct NodeUserData {
+ pub watched: WatchedState,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "snake_case")]
+pub enum WatchedState {
+ None,
+ Progress(f64),
+ Watched,
+}
+
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
#[cfg_attr(feature = "rocket", derive(FromFormField, UriDisplayQuery))]
#[serde(rename_all = "snake_case")]
@@ -94,3 +107,11 @@ impl Display for UserPermission {
})
}
}
+
+impl Default for NodeUserData {
+ fn default() -> Self {
+ Self {
+ watched: WatchedState::None,
+ }
+ }
+}