Payouts finish (#470)

* Almost done

* More work on midas

* Finish payouts backend

* Update Cargo.lock

* Run fmt + prepare
This commit is contained in:
Geometrically
2022-10-30 23:34:56 -07:00
committed by GitHub
parent 6e72be54cb
commit 2ca6e67b37
31 changed files with 2267 additions and 1050 deletions

View File

@@ -13,6 +13,7 @@ bitflags::bitflags! {
#[derive(Serialize, Deserialize)]
#[serde(transparent)]
pub struct Badges: u64 {
// 1 << 0 unused - ignore + replace with something later
const MIDAS = 1 << 0;
const EARLY_MODPACK_ADOPTER = 1 << 1;
const EARLY_RESPACK_ADOPTER = 1 << 2;
@@ -44,6 +45,7 @@ pub struct User {
pub created: DateTime<Utc>,
pub role: Role,
pub badges: Badges,
pub paypal_email: Option<String>,
}
use crate::database::models::user_item::User as DBUser;
@@ -60,6 +62,7 @@ impl From<DBUser> for User {
created: data.created,
role: Role::from_string(&*data.role),
badges: data.badges,
paypal_email: None,
}
}
}