cyaxon_authifier/models/invite.rs
1fn is_false(t: &bool) -> bool {
2 !t
3}
4
5/// Invite ticket
6#[derive(Debug, Serialize, Deserialize, Clone)]
7pub struct Invite {
8 /// Invite code
9 #[serde(rename = "_id")]
10 pub id: String,
11 /// Whether this invite ticket has been used
12 #[serde(skip_serializing_if = "is_false", default)]
13 pub used: bool,
14 /// User ID that this invite was claimed by
15 #[serde(skip_serializing_if = "Option::is_none")]
16 pub claimed_by: Option<String>,
17}