src/Entity/AccionVenta.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\AccionVentaRepository")
  7.  * @ORM\Table(name="accion_venta")
  8.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
  9.  */
  10. class AccionVenta extends \App\Entity\AccionAbstract
  11. {
  12.     /**
  13.      * @ORM\Column(type="float", nullable=true, precision=2, options={"default":0,"unsigned":true})
  14.      */
  15.     private $coste;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=\App\Entity\TipoCargoVenta::class, inversedBy="accionesVenta")
  18.      * @ORM\JoinColumn(name="tipo_cargo_id", referencedColumnName="id")
  19.      */
  20.     private $tipo;
  21.     public function __toString(): string
  22.     {
  23.         return $this->getTipo()?->getNombre() ?? '---';
  24.     }
  25.     public function getCoste(): ?float
  26.     {
  27.         return $this->coste;
  28.     }
  29.     public function setCoste(?float $coste): static
  30.     {
  31.         $this->coste $coste;
  32.         return $this;
  33.     }
  34.     public function getTipo(): ?TipoCargoVenta
  35.     {
  36.         return $this->tipo;
  37.     }
  38.     public function setTipo(?TipoCargoVenta $tipo): static
  39.     {
  40.         $this->tipo $tipo;
  41.         return $this;
  42.     }
  43. }