mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Servers: Add categories to server model.
This commit is contained in:
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user