Start development sprint 3.

This commit is contained in:
Paul Makles
2021-01-18 13:41:48 +00:00
parent a9f258de6b
commit af8731ac38
8 changed files with 75 additions and 45 deletions

View File

@@ -1,39 +1,7 @@
use crate::{
database::get_collection,
util::result::{Error, Result},
};
use crate::database::*;
use mongodb::bson::to_document;
use serde::{Deserialize, Serialize};
/*#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct LastMessage {
id: String,
user_id: String,
short_content: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Channel {
#[serde(rename = "_id")]
pub id: String,
#[serde(rename = "type")]
pub channel_type: u8,
// DM: whether the DM is active
pub active: Option<bool>,
// DM + GDM: last message in channel
pub last_message: Option<LastMessage>,
// DM + GDM: recipients for channel
pub recipients: Option<Vec<String>>,
// GDM: owner of group
pub owner: Option<String>,
// GUILD: channel parent
pub guild: Option<String>,
// GUILD + GDM: channel name
pub name: Option<String>,
// GUILD + GDM: channel description
pub description: Option<String>,
}*/
use crate::util::result::{Error, Result};
#[derive(Serialize, Deserialize, Debug)]
#[serde(tag = "type")]