Servers: Add categories to server model.

This commit is contained in:
Paul
2021-06-27 00:13:35 +01:00
parent f35a1049da
commit a017872c99
4 changed files with 12 additions and 2 deletions

View File

@@ -46,6 +46,13 @@ pub struct Role {
// Bri'ish API conventions
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Category {
pub id: String,
pub title: String,
pub channels: Vec<String>
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Ban {
#[serde(rename = "_id")]
@@ -81,6 +88,8 @@ pub struct Server {
pub channels: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub categories: Option<Vec<Category>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub system_messages: Option<SystemMessageChannels>,
#[serde(default = "HashMap::new", skip_serializing_if = "HashMap::is_empty")]