Database: Add user settings sync entity.

Run cargo fmt.
This commit is contained in:
Paul
2021-05-26 11:02:16 +01:00
parent 7aad88ad3f
commit 5aa9624d5c
13 changed files with 67 additions and 41 deletions

View File

@@ -4,11 +4,11 @@ use mongodb::{
bson::{doc, from_document},
options::FindOptions,
};
use serde::{Deserialize, Serialize};
use validator::Validate;
use num_enum::TryFromPrimitive;
use ulid::Ulid;
use serde::{Deserialize, Serialize};
use std::ops;
use ulid::Ulid;
use validator::Validate;
use crate::database::permissions::user::UserPermissions;
use crate::database::*;
@@ -65,7 +65,7 @@ pub enum Badges {
Developer = 1,
Translator = 2,
Supporter = 4,
EarlyAdopter = 256
EarlyAdopter = 256,
}
impl_op_ex_commutative!(+ |a: &i32, b: &Badges| -> i32 { *a | *b as i32 });