potree_auth/project/domain/
mod.rs1pub mod authorization;
2
3use crate::common::domain::Group;
4use crate::common::domain::utils::new_type::new_type;
5
6#[derive(Debug, Clone, PartialEq)]
8#[cfg_attr(any(test, feature = "fake"), derive(fake::Dummy))]
9pub struct Project {
10 pub id: ProjectId,
11
12 pub name: ProjectName,
14
15 pub description: Option<ProjectDescription>,
17
18 pub groups: Vec<Group>,
20}
21
22new_type![
23 #[derive(serde::Deserialize, serde::Serialize)]
25 ProjectId(String)
26];
27
28new_type![
29 #[derive(serde::Deserialize, serde::Serialize)]
31 ProjectName(
32 #[cfg_attr(test, dummy(faker = "fake::faker::name::en::Name()"))]
33 String
34 )
35];
36
37new_type![
38 #[derive(serde::Deserialize, serde::Serialize)]
40 ProjectDescription(String)
41];