'decimal:4', 'positivo' => 'decimal:4', 'neutral' => 'decimal:4', 'negativo' => 'decimal:4', 'muy_negativo' => 'decimal:4', ]; } public function giro(): BelongsTo { return $this->belongsTo(Giro::class); } public function evaluarValor(float $valor): string { if ($this->muy_positivo !== null && $valor >= $this->muy_positivo) { return 'muy_positivo'; } if ($this->positivo !== null && $valor >= $this->positivo) { return 'positivo'; } if ($this->neutral !== null && $valor >= $this->neutral) { return 'neutral'; } if ($this->negativo !== null && $valor >= $this->negativo) { return 'negativo'; } return 'muy_negativo'; } }