feat(iace): Betriebszustand-Traceability auf Hazards + Mitigations
Hazards zeigen jetzt farbige Badges mit den Betriebszustaenden die sie ausgeloest haben (z.B. "Wartung", "Not-Halt"). Mitigations erben die States ihrer verknuepften Hazards. Backend: OperationalStates im Function-Feld encodiert (kein DB-Schema), beim Lesen als operational_states[] JSON-Feld zurueckgegeben. Frontend: Indigo-Badges in HazardTable + MitigationCard. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,9 @@ type Hazard struct {
|
||||
// "harm" — the injury outcome (e.g. crushing)
|
||||
// Derived field — not stored in DB. Computed by DeriveHazardType().
|
||||
HazardType string `json:"hazard_type,omitempty"`
|
||||
// OperationalStates lists which machine states triggered this hazard.
|
||||
// Derived field — encoded in Function column as "op_states:x,y,z", parsed on read.
|
||||
OperationalStates []string `json:"operational_states,omitempty"`
|
||||
ReviewStatus ReviewStatus `json:"review_status,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
Reference in New Issue
Block a user