<?php
namespace App\Entity;
use App\Enum\TipoAccionEnum;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\AccionEstadoRepository")
* @ORM\Table(name="accion_estado", schema="perseo")
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
*/
class AccionEstado extends AccionAbstract
{
/**
* @ORM\Column(type="float", nullable=true, precision=2)
*/
private $precio;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\EstadoReloj", inversedBy="accionesEstado")
* @ORM\JoinColumn(name="estado_reloj_id", referencedColumnName="id")
*/
private $estado;
public function __toString(): string
{
return $this->getEstado()?->getNombre() ?? '---';
}
public function getPrecio(): ?float
{
return $this->precio;
}
public function setPrecio(?float $precio): self
{
$this->precio = $precio;
return $this;
}
public function getEstado(): ?EstadoReloj
{
return $this->estado;
}
public function setEstado(?EstadoReloj $estado): self
{
$this->estado = $estado;
return $this;
}
}