// use derive_more::derive::Display; use serde::{Deserialize, Serialize}; use crate::newtype; newtype!( NextcloudHostname, String, Display, PartialOrd, Ord, "Hostname of the Nextcloud server" ); newtype!( NextcloudUsername, String, Display, PartialOrd, Ord, "Username to authenticate as" ); newtype!( NextcloudPassword, String, PartialOrd, Ord, "Password to authenticate with" ); newtype!( NextcloudBoardId, i64, Copy, Display, PartialOrd, Ord, "ID of a Nextcloud Board" ); newtype!( NextcloudStackId, i64, Copy, Display, PartialOrd, Ord, "ID of a Nextcloud Stack" ); newtype!( NextcloudCardId, i64, Copy, Display, PartialOrd, Ord, "ID of a Nextcloud Card" ); newtype!( NextcloudLabelId, i64, Copy, Display, PartialOrd, Ord, "ID of a Nextcloud Label" ); newtype!( NextcloudOrder, i64, Copy, Display, PartialOrd, Ord, "Relative position of the item amongst its peers" ); newtype!( NextcloudETag, String, PartialOrd, Ord, "ETag for a resource" ); newtype!( NextcloudBoardTitle, String, Display, PartialOrd, Ord, "Title of the Board" ); newtype!( NextcloudBoardColour, String, PartialOrd, Ord, "Colour of the Board" ); newtype!( NextcloudStackTitle, String, Display, PartialOrd, Ord, "Title of the Stack" ); newtype!( NextcloudCardTitle, String, Display, PartialOrd, Ord, "Title of the Card" ); newtype!( NextcloudCardDescription, String, Display, PartialOrd, Ord, "Description of the Card" ); #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub(crate) struct NextcloudBoardOwner { #[serde(rename = "primaryKey")] pub(crate) primary_key: String, pub(crate) uid: String, #[serde(rename = "displayname")] pub(crate) display_name: String, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub(crate) struct Board { pub(crate) id: NextcloudBoardId, pub(crate) title: NextcloudBoardTitle, pub(crate) owner: NextcloudBoardOwner, pub(crate) color: NextcloudBoardColour, pub(crate) archived: bool, pub(crate) labels: Vec