use revolt_result::Result;
use crate::{Bot, FieldsBot, PartialBot};
mod mongodb;
mod reference;
#[async_trait]
pub trait AbstractBots: Sync + Send {
async fn insert_bot(&self, bot: &Bot) -> Result<()>;
async fn fetch_bot(&self, id: &str) -> Result<Bot>;
async fn fetch_bot_by_token(&self, token: &str) -> Result<Bot>;
async fn fetch_bots_by_user(&self, user_id: &str) -> Result<Vec<Bot>>;
async fn get_number_of_bots_by_user(&self, user_id: &str) -> Result<usize>;
async fn update_bot(
&self,
id: &str,
partial: &PartialBot,
remove: Vec<FieldsBot>,
) -> Result<()>;
async fn delete_bot(&self, id: &str) -> Result<()>;
}