Problem
Assets need to be associated with departments but no Department entity exists. Without this, asset grouping and reporting by department is impossible.
Proposed Solution
Create backend/src/opsce/departments/entities/department.entity.ts with a self-referential parent/child relation for department hierarchies.
Acceptance Criteria
Problem
Assets need to be associated with departments but no Department entity exists. Without this, asset grouping and reporting by department is impossible.
Proposed Solution
Create
backend/src/opsce/departments/entities/department.entity.tswith a self-referential parent/child relation for department hierarchies.Acceptance Criteria
id(UUID),name(unique),description,code,isActive,createdAt,updatedAt@ManyToOneself-referential relation forparentdepartment@OneToManyback-referencechildrendepartments@OneToManyback-reference toAssetentityOpsceModule