src/Entity/CosteVenta.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\CosteVentaRepository")
  8.  * @ORM\Table(name="coste_venta", schema="perseo")
  9.  * @ORM\EntityListeners({"App\EntityListener\CosteVenta\CalcularPrecioTotalRelojListener"})
  10.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
  11.  */
  12. class CosteVenta
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\Column(type="bigint", options={"unsigned":true})
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     protected $id;
  20.     /**
  21.      * @ORM\Column(type="float", nullable=false, precision=2, options={"default":"0.00"})
  22.      */
  23.     protected $precio;
  24.     /**
  25.      * @ORM\Column(type="text", nullable=true)
  26.      */
  27.     protected $descripcion;
  28.     /**
  29.      * @ORM\Column(type="datetime", nullable=true, name="deleted_at")
  30.      */
  31.     protected $deletedAt;
  32.     /**
  33.      * @ORM\Column(type="datetime", nullable=false, name="updated_at", options={"default":"2022-01-01 00:00:00"})
  34.      * @Gedmo\Timestampable(on="update")
  35.      */
  36.     protected $updatedAt;
  37.     /**
  38.      * @ORM\Column(type="datetime", nullable=false, name="created_at", options={"default":"2022-01-01 00:00:00"})
  39.      * @Gedmo\Timestampable(on="create")
  40.      */
  41.     protected $createdAt;
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity="App\Entity\TipoCargoAbstract", inversedBy="costesVenta")
  44.      * @ORM\JoinColumn(name="tipo_cargo_id", referencedColumnName="id")
  45.      */
  46.     protected $tipoCargo;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\Venta", inversedBy="costesVenta")
  49.      * @ORM\JoinColumn(name="venta_id", referencedColumnName="id")
  50.      */
  51.     protected $venta;
  52.     public function getId(): ?string
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getPrecio(): ?float
  57.     {
  58.         return $this->precio;
  59.     }
  60.     public function setPrecio(float $precio): self
  61.     {
  62.         $this->precio $precio;
  63.         return $this;
  64.     }
  65.     public function getDescripcion(): ?string
  66.     {
  67.         return $this->descripcion;
  68.     }
  69.     public function setDescripcion(?string $descripcion): self
  70.     {
  71.         $this->descripcion $descripcion;
  72.         return $this;
  73.     }
  74.     public function getDeletedAt(): ?\DateTimeInterface
  75.     {
  76.         return $this->deletedAt;
  77.     }
  78.     public function setDeletedAt(?\DateTimeInterface $deletedAt): self
  79.     {
  80.         $this->deletedAt $deletedAt;
  81.         return $this;
  82.     }
  83.     public function getUpdatedAt(): ?\DateTimeInterface
  84.     {
  85.         return $this->updatedAt;
  86.     }
  87.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  88.     {
  89.         $this->updatedAt $updatedAt;
  90.         return $this;
  91.     }
  92.     public function getCreatedAt(): ?\DateTimeInterface
  93.     {
  94.         return $this->createdAt;
  95.     }
  96.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  97.     {
  98.         $this->createdAt $createdAt;
  99.         return $this;
  100.     }
  101.     public function getTipoCargo(): ?TipoCargoAbstract
  102.     {
  103.         return $this->tipoCargo;
  104.     }
  105.     public function setTipoCargo(?TipoCargoAbstract $tipoCargo): self
  106.     {
  107.         $this->tipoCargo $tipoCargo;
  108.         return $this;
  109.     }
  110.     public function getVenta(): ?Venta
  111.     {
  112.         return $this->venta;
  113.     }
  114.     public function setVenta(?Venta $venta): self
  115.     {
  116.         $this->venta $venta;
  117.         return $this;
  118.     }
  119. }