diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index 00f0a898..912264a6 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -83,6 +83,21 @@ impl PartialOrd for UserOrgType { } return None } + + fn gt(&self, other: &i32) -> bool { + match self.partial_cmp(other) { + Some(Ordering::Less) => false, + _ => true, + } + } + + fn ge(&self, other: &i32) -> bool { + match self.partial_cmp(other) { + Some(Ordering::Less) => false, + _ => true, + } + } + } impl PartialEq for i32 { @@ -98,6 +113,21 @@ impl PartialOrd for i32 { } return None } + + fn lt(&self, other: &UserOrgType) -> bool { + match self.partial_cmp(other) { + Some(Ordering::Less) | None => true, + _ => false, + } + } + + fn le(&self, other: &UserOrgType) -> bool { + match self.partial_cmp(other) { + Some(Ordering::Less) | Some(Ordering::Equal) | None => true, + _ => false, + } + } + } impl UserOrgType {