pub struct Department {
pub code: String,
pub name: String,
pub parent_code: Option<String>,
pub cost_center: String,
pub typical_personas: Vec<UserPersona>,
pub primary_processes: Vec<BusinessProcess>,
pub standard_headcount: DepartmentHeadcount,
pub is_active: bool,
}Expand description
Department definition for organizational structure.
Fields§
§code: StringDepartment code (e.g., “FIN”, “AP”, “AR”)
name: StringDepartment name (e.g., “Finance”, “Accounts Payable”)
parent_code: Option<String>Parent department code (for hierarchy)
cost_center: StringAssociated cost center
typical_personas: Vec<UserPersona>Typical user personas in this department
primary_processes: Vec<BusinessProcess>Primary business processes handled
standard_headcount: DepartmentHeadcountStandard headcount for this department
is_active: boolIs this department active
Implementations§
Source§impl Department
impl Department
Sourcepub fn with_parent(self, parent_code: &str) -> Self
pub fn with_parent(self, parent_code: &str) -> Self
Set parent department.
Sourcepub fn with_personas(self, personas: Vec<UserPersona>) -> Self
pub fn with_personas(self, personas: Vec<UserPersona>) -> Self
Add typical personas.
Sourcepub fn with_processes(self, processes: Vec<BusinessProcess>) -> Self
pub fn with_processes(self, processes: Vec<BusinessProcess>) -> Self
Add primary business processes.
Sourcepub fn with_headcount(self, headcount: DepartmentHeadcount) -> Self
pub fn with_headcount(self, headcount: DepartmentHeadcount) -> Self
Set headcount.
Sourcepub fn handles_process(&self, process: BusinessProcess) -> bool
pub fn handles_process(&self, process: BusinessProcess) -> bool
Check if this department handles a specific business process.
Sourcepub fn is_typical_persona(&self, persona: UserPersona) -> bool
pub fn is_typical_persona(&self, persona: UserPersona) -> bool
Check if a persona is typical for this department.
Trait Implementations§
Source§impl Clone for Department
impl Clone for Department
Source§fn clone(&self) -> Department
fn clone(&self) -> Department
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Department
impl Debug for Department
Source§impl<'de> Deserialize<'de> for Department
impl<'de> Deserialize<'de> for Department
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Department
impl RefUnwindSafe for Department
impl Send for Department
impl Sync for Department
impl Unpin for Department
impl UnwindSafe for Department
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more