Store quotas as u64

This commit is contained in:
mdecimus
2024-03-05 11:01:59 +01:00
parent 48f255b31f
commit f92027142c
9 changed files with 15 additions and 15 deletions

View File

@@ -175,7 +175,7 @@ pub enum PrincipalAction {
pub enum PrincipalValue {
String(String),
StringList(Vec<String>),
Integer(u32),
Integer(u64),
}
impl PrincipalUpdate {

View File

@@ -222,7 +222,7 @@ impl SqlMappings {
}
} else if name.eq_ignore_ascii_case(&self.column_quota) {
if let Value::Integer(quota) = value {
principal.quota = quota as u32;
principal.quota = quota as u64;
}
}
}

View File

@@ -57,7 +57,7 @@ pub struct Principal<T> {
#[serde(rename = "type")]
pub typ: Type,
#[serde(default)]
pub quota: u32,
pub quota: u64,
pub name: String,
#[serde(default)]
pub secrets: Vec<String>,