Expand description
Use cases for ContractorEvaluation (Story 3.9 — FR34 FR35 INV-21
INV-24).
One operation exposed to handlers:
ContractorEvaluationUseCases::create_evaluation — a syndic (or a
mandated owner) records an evaluation against a contractor. Guards
enforced here:
- the referenced
TechnicalSpecMUST exist (elseAppError::NotFound); - it MUST be in
TechnicalSpecStatus::Approved— a Draft / PendingSignatures / Superseded spec does not legitimise an evaluation (elseAppError::TechnicalSpecRequired→ 422); ContractorEvaluation::newvalidates every structural invariant (scores in[1, 5], comment length, no self-evaluation, no duplicate linked tickets, no nil UUIDs).
Append-only behaviour is enforced at the DB trigger level — the use case exposes no update / delete; the repo trait has no such methods either.
Structs§
- Contractor
Evaluation UseCases - Use cases container. Holds trait-object handles to the two repositories
(parallel to
TechnicalSpecUseCases) so AppState can store it as a non-genericArc<…>without forcing every downstream consumer to carry type parameters.