ofdb_entities/
organization.rs

1use crate::id::Id;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct ModeratedTag {
5    pub label: String,
6    pub allow_add: bool,
7    pub allow_remove: bool,
8    pub require_clearance: bool,
9}
10
11// Workaround for backwards compatibility
12// TODO: Remove after updating tests
13impl From<&str> for ModeratedTag {
14    fn from(from: &str) -> Self {
15        Self {
16            label: from.to_string(),
17            allow_add: false,
18            allow_remove: false,
19            require_clearance: false,
20        }
21    }
22}
23
24#[derive(Debug, Clone, PartialEq, Eq)]
25pub struct Organization {
26    pub id: Id,
27    pub name: String,
28    pub api_token: String,
29    pub moderated_tags: Vec<ModeratedTag>,
30}