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