diff --git a/src/db/mod.rs b/src/db/mod.rs index b703147..1a0715b 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -12,7 +12,7 @@ use futures::stream::TryStreamExt; use mongodb::options::IndexOptions; use mongodb::{bson::doc, options::ClientOptions, Client}; -use mongodb::{Database, IndexModel}; +use mongodb::{Collection, Database, IndexModel}; use serde::{Deserialize, Serialize}; #[derive(EnumStringify)] @@ -193,6 +193,14 @@ impl DB { } } +pub trait DbCollection { + const COLLECTION: &str; +} + +pub trait GetCollection { + async fn get_collection(&mut self) -> Collection; +} + #[async_trait] impl CallDB for DB { async fn get_database(&mut self) -> Database {