Skip to main content

cts_common/auth/claims/
org.rs

1#[cfg(feature = "test_utils")]
2use fake::Fake;
3use serde::{Deserialize, Serialize};
4
5#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
6pub struct Org {
7    pub id: String,
8}
9
10impl Org {
11    pub fn id(&self) -> &str {
12        &self.id
13    }
14}
15
16#[cfg(feature = "test_utils")]
17impl<T> fake::Dummy<T> for Org {
18    fn dummy_with_rng<R: rand::Rng + ?Sized>(_: &T, _rng: &mut R) -> Self {
19        Self {
20            id: fake::Faker.fake(),
21        }
22    }
23}