DelayReason::class, 'weather_condition' => WeatherCondition::class, 'delay_date' => 'date', 'lost_hours' => 'decimal:2', ]; } public function task(): BelongsTo { return $this->belongsTo(Task::class); } public function reporter(): BelongsTo { return $this->belongsTo(User::class, 'reported_by'); } // --- Accessors --- public function getIsWeatherRelatedAttribute(): bool { return $this->reason_type === DelayReason::Weather; } public function getLostDaysAttribute(): float { return round((float) $this->lost_hours / 8, 1); } }