src/Entity/ValoracionesRelojesSinStock.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\HttpFoundation\File\File;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\Repository\ValoracionesRelojesSinStockRepository")
  11.  * @ORM\Table(name="valoraciones_relojes_sin_stock", schema="perseo")
  12.  * @Vich\Uploadable
  13.  */
  14. class ValoracionesRelojesSinStock extends ValoracionesRelojes
  15. {
  16.     /**
  17.      * @ORM\Column(type="string", nullable=true, name="reloj_idperseo")
  18.      */
  19.     protected $relojIDPerseo;
  20.     /**
  21.      * @ORM\Column(type="string", nullable=true, name="reloj_foto")
  22.      */
  23.     protected $relojFoto;
  24.     /**
  25.      * @Vich\UploadableField(mapping="reloj", fileNameProperty="relojFoto")
  26.      * @var File
  27.      */
  28.     protected $relojFotoFile;
  29.     /**
  30.      * @ORM\Column(type="string", nullable=true, name="reloj_modelo1")
  31.      */
  32.     protected $relojModelo1;
  33.     /**
  34.      * @ORM\Column(type="string", nullable=true, name="reloj_ref1")
  35.      */
  36.     protected $relojRef1;
  37.     /**
  38.      * @ORM\Column(
  39.      *     type="integer",
  40.      *     length=4,
  41.      *     nullable=true,
  42.      *     name="reloj_fecha",
  43.      *     options={"comment":"Fecha comprado por primera vez, solo el año"}
  44.      * )
  45.      */
  46.     protected $relojFecha;
  47.     /**
  48.      * @ORM\Column(type="boolean", nullable=false, name="reloj_caja", options={"default":0})
  49.      */
  50.     protected $relojCaja;
  51.     /**
  52.      * @ORM\Column(type="boolean", nullable=false, name="reloj_papeles", options={"default":0})
  53.      */
  54.     protected $relojPapeles;
  55.     /**
  56.      * @ORM\Column(type="float", nullable=true, name="itp", precision=2)
  57.      */
  58.     protected $ITP;
  59.     /**
  60.      * @ORM\Column(
  61.      *     type="float",
  62.      *     nullable=true,
  63.      *     options={
  64.      *         "default":"0.0",
  65.      *         "comment":"Comsión CRONO esta en gastos , pero se duplica fuera para tener mejor acceso a ella"
  66.      *     }
  67.      * )
  68.      */
  69.     protected $comision;
  70.     /**
  71.      * @ORM\Column(type="float", nullable=true, precision=2, name="precio_coste")
  72.      */
  73.     protected $precioCoste;
  74.     /**
  75.      * @ORM\Column(
  76.      *     type="float",
  77.      *     nullable=true,
  78.      *     name="precio_coste_total",
  79.      *     precision=2,
  80.      *     options={"comment":"Autocalculado, cada vez que se añade/modifique un coste ó cambie su coste"}
  81.      * )
  82.      */
  83.     protected $precioCosteTotal;
  84.     /**
  85.      * @ORM\Column(type="float", nullable=true, precision=2, name="precio_min_venta")
  86.      */
  87.     protected $precioMinVenta;
  88.     /**
  89.      * @ORM\Column(type="float", nullable=true, precision=2, name="precio_promocion")
  90.      */
  91.     protected $precioPromocion;
  92.     /**
  93.      * @ORM\Column(type="float", nullable=true, precision=2, name="precio_oferta")
  94.      */
  95.     protected $precioOferta;
  96.     /**
  97.      * @ORM\Column(type="float", nullable=true, precision=2, name="precio_referencia")
  98.      */
  99.     protected $precioReferencia;
  100.     /**
  101.      * @ORM\Column(type="float", nullable=true, precision=2, name="precio_pagar")
  102.      */
  103.     protected $precioPagar;
  104.     /**
  105.      * @ORM\Column(type="float", nullable=true, precision=0, name="margen_minimo")
  106.      */
  107.     protected $margenMinimo;
  108.     /**
  109.      * @ORM\Column(type="float", nullable=true, precision=0, name="margen_deseado")
  110.      */
  111.     protected $margenDeseado;
  112.     /**
  113.      * @ORM\Column(type="float", nullable=true, precision=0, name="margen_promocion")
  114.      */
  115.     protected $margenPromocion;
  116.     /**
  117.      * @ORM\Column(type="float", nullable=true, precision=0, name="costes_total")
  118.      */
  119.     protected $costesTotal;
  120.     /**
  121.      * @ORM\OneToOne(targetEntity=\App\Entity\Reloj::class, inversedBy="valoracionReloj")
  122.      * @ORM\JoinColumn(name="reloj_inventario_id", referencedColumnName="id", unique=true)
  123.      */
  124.     private $relojInventario;
  125.     /**
  126.      * @ORM\OneToOne(targetEntity=\App\Entity\DetalleCompra::class, mappedBy="valoracionReloj")
  127.      */
  128.     private $detalleCompra;
  129.     /**
  130.      * @ORM\OneToMany(targetEntity="App\Entity\Referencia", mappedBy="valoracionReloj", cascade={"persist"})
  131.      */
  132.     protected $referencias;
  133.     /**
  134.      * @ORM\OneToMany(targetEntity="App\Entity\Coste", mappedBy="valoracionesRelojes", cascade={"persist"})
  135.      */
  136.     protected $costes;
  137.     /**
  138.      * @ORM\ManyToOne(targetEntity="App\Entity\Marca", inversedBy="valoracionesRelojes")
  139.      * @ORM\JoinColumn(name="reloj_marca_id", referencedColumnName="id")
  140.      * @Assert\Valid()
  141.      */
  142.     protected $relojMarca;
  143.     /**
  144.      * @ORM\ManyToOne(targetEntity="App\Entity\EstadoAspecto", inversedBy="valoracionesRelojes")
  145.      * @ORM\JoinColumn(name="reloj_aspecto_id", referencedColumnName="id")
  146.      */
  147.     protected $relojAspecto;
  148.     /**
  149.      * @ORM\ManyToOne(targetEntity="App\Entity\Valoracion", inversedBy="valoracionesRelojesSinStocks")
  150.      * @ORM\JoinColumn(name="valoracion_id", referencedColumnName="id")
  151.      */
  152.     protected $valoracion;
  153.     public function __construct()
  154.     {
  155.         $this->relojCaja false;
  156.         $this->relojPapeles false;
  157.         $this->costes = new ArrayCollection();
  158.         $this->referencias = new ArrayCollection();
  159.     }
  160.     public function getRelojFotoFile(): ?File
  161.     {
  162.         return $this->relojFotoFile;
  163.     }
  164.     public function setRelojFotoFile(?File $relojFotoFile): self
  165.     {
  166.         $this->relojFotoFile $relojFotoFile;
  167.         if ($relojFotoFile) {
  168.             // if 'updatedAt' is not defined in your entity, use another property
  169.             $this->setUpdatedAt(new \DateTime('now'));
  170.         }
  171.         return $this;
  172.     }
  173.     public function getITP(): ?float
  174.     {
  175.         return $this->ITP;
  176.     }
  177.     public function setITP(?float $ITP): self
  178.     {
  179.         $this->ITP $ITP;
  180.         return $this;
  181.     }
  182.     public function getComision(): ?float
  183.     {
  184.         return $this->comision;
  185.     }
  186.     public function setComision(?float $comision): self
  187.     {
  188.         $this->comision $comision;
  189.         return $this;
  190.     }
  191.     public function getPrecioCoste(): ?float
  192.     {
  193.         return $this->precioCoste;
  194.     }
  195.     public function setPrecioCoste(?float $precioCoste): self
  196.     {
  197.         $this->precioCoste $precioCoste;
  198.         return $this;
  199.     }
  200.     public function getPrecioCosteTotal(): ?float
  201.     {
  202.         return $this->precioCosteTotal;
  203.     }
  204.     public function setPrecioCosteTotal(?float $precioCosteTotal): self
  205.     {
  206.         $this->precioCosteTotal $precioCosteTotal;
  207.         return $this;
  208.     }
  209.     public function getPrecioMinVenta(): ?float
  210.     {
  211.         return $this->precioMinVenta;
  212.     }
  213.     public function setPrecioMinVenta(?float $precioMinVenta): self
  214.     {
  215.         $this->precioMinVenta $precioMinVenta;
  216.         return $this;
  217.     }
  218.     public function getPrecioPromocion(): ?float
  219.     {
  220.         return $this->precioPromocion;
  221.     }
  222.     public function setPrecioPromocion(?float $precioPromocion): self
  223.     {
  224.         $this->precioPromocion $precioPromocion;
  225.         return $this;
  226.     }
  227.     public function getPrecioOferta(): ?float
  228.     {
  229.         return $this->precioOferta;
  230.     }
  231.     public function setPrecioOferta(?float $precioOferta): self
  232.     {
  233.         $this->precioOferta $precioOferta;
  234.         return $this;
  235.     }
  236.     public function getPrecioReferencia(): ?float
  237.     {
  238.         return $this->precioReferencia;
  239.     }
  240.     public function setPrecioReferencia(?float $precioReferencia): self
  241.     {
  242.         $this->precioReferencia $precioReferencia;
  243.         return $this;
  244.     }
  245.     public function getPrecioPagar(): ?float
  246.     {
  247.         return $this->precioPagar;
  248.     }
  249.     public function setPrecioPagar(?float $precioPagar): self
  250.     {
  251.         $this->precioPagar $precioPagar;
  252.         return $this;
  253.     }
  254.     public function getMargenMinimo(): ?float
  255.     {
  256.         return $this->margenMinimo;
  257.     }
  258.     public function setMargenMinimo(?float $margenMinimo): self
  259.     {
  260.         $this->margenMinimo $margenMinimo;
  261.         return $this;
  262.     }
  263.     public function getMargenDeseado(): ?float
  264.     {
  265.         return $this->margenDeseado;
  266.     }
  267.     public function setMargenDeseado(?float $margenDeseado): self
  268.     {
  269.         $this->margenDeseado $margenDeseado;
  270.         return $this;
  271.     }
  272.     public function getMargenPromocion(): ?float
  273.     {
  274.         return $this->margenPromocion;
  275.     }
  276.     public function setMargenPromocion(?float $margenPromocion): self
  277.     {
  278.         $this->margenPromocion $margenPromocion;
  279.         return $this;
  280.     }
  281.     public function getIsPrecioChrono24(): ?bool
  282.     {
  283.         return $this->isPrecioChrono24;
  284.     }
  285.     public function setIsPrecioChrono24(?bool $isPrecioChrono24): self
  286.     {
  287.         $this->isPrecioChrono24 $isPrecioChrono24;
  288.         return $this;
  289.     }
  290.     public function getRelojIDPerseo(): ?string
  291.     {
  292.         return $this->relojIDPerseo;
  293.     }
  294.     public function setRelojIDPerseo(?string $relojIDPerseo): self
  295.     {
  296.         $this->relojIDPerseo $relojIDPerseo;
  297.         return $this;
  298.     }
  299.     public function getRelojFoto(): ?string
  300.     {
  301.         return $this->relojFoto;
  302.     }
  303.     public function setRelojFoto(?string $relojFoto): self
  304.     {
  305.         $this->relojFoto $relojFoto;
  306.         return $this;
  307.     }
  308.     public function getRelojModelo1(): ?string
  309.     {
  310.         return $this->relojModelo1;
  311.     }
  312.     public function setRelojModelo1(?string $relojModelo): self
  313.     {
  314.         $this->relojModelo1 $relojModelo;
  315.         return $this;
  316.     }
  317.     public function getRelojRef1(): ?string
  318.     {
  319.         return $this->relojRef1;
  320.     }
  321.     public function setRelojRef1(?string $relojRef): self
  322.     {
  323.         $this->relojRef1 $relojRef;
  324.         return $this;
  325.     }
  326.     public function getRelojFecha(): ?int
  327.     {
  328.         return $this->relojFecha;
  329.     }
  330.     public function setRelojFecha(?int $relojFecha): self
  331.     {
  332.         $this->relojFecha $relojFecha;
  333.         return $this;
  334.     }
  335.     public function getRelojCaja(): ?bool
  336.     {
  337.         return $this->relojCaja;
  338.     }
  339.     public function setRelojCaja(bool $relojCaja): self
  340.     {
  341.         $this->relojCaja $relojCaja;
  342.         return $this;
  343.     }
  344.     public function getRelojPapeles(): ?bool
  345.     {
  346.         return $this->relojPapeles;
  347.     }
  348.     public function setRelojPapeles(bool $relojPapeles): self
  349.     {
  350.         $this->relojPapeles $relojPapeles;
  351.         return $this;
  352.     }
  353.     public function getRelojMarca(): ?Marca
  354.     {
  355.         return $this->relojMarca;
  356.     }
  357.     public function setRelojMarca(?Marca $relojMarca): self
  358.     {
  359.         $this->relojMarca $relojMarca;
  360.         return $this;
  361.     }
  362.     public function getRelojAspecto(): ?EstadoAspecto
  363.     {
  364.         return $this->relojAspecto;
  365.     }
  366.     public function setRelojAspecto(?EstadoAspecto $relojAspecto): self
  367.     {
  368.         $this->relojAspecto $relojAspecto;
  369.         return $this;
  370.     }
  371.     public function getValoracion(): ?Valoracion
  372.     {
  373.         return $this->valoracion;
  374.     }
  375.     public function setValoracion(?Valoracion $valoracion): self
  376.     {
  377.         $this->valoracion $valoracion;
  378.         return $this;
  379.     }
  380.     /**
  381.      * @return Collection|Coste[]
  382.      */
  383.     public function getCostes(): Collection
  384.     {
  385.         return $this->costes;
  386.     }
  387.     public function addCoste(Coste $coste): self
  388.     {
  389.         if (!$this->costes->contains($coste)) {
  390.             $this->costes[] = $coste;
  391.             $coste->setValoracionesRelojes($this);
  392.         }
  393.         return $this;
  394.     }
  395.     public function removeCoste(Coste $coste): self
  396.     {
  397.         if ($this->costes->removeElement($coste)) {
  398.             // set the owning side to null (unless already changed)
  399.             if ($coste->getValoracionesRelojes() === $this) {
  400.                 //$coste->setValoracionesRelojes(null);
  401.                 $coste->setDeletedAt(new DateTime('now'));
  402.             }
  403.         }
  404.         return $this;
  405.     }
  406.     public function getCostesTotal(): ?float
  407.     {
  408.         return $this->costesTotal;
  409.     }
  410.     public function setCostesTotal(?float $costesTotal): self
  411.     {
  412.         $this->costesTotal $costesTotal;
  413.         return $this;
  414.     }
  415.     /**
  416.      * @return Collection|Referencia[]
  417.      */
  418.     public function getReferencias(): Collection
  419.     {
  420.         return $this->referencias;
  421.     }
  422.     public function addReferencia(Referencia $referencia): self
  423.     {
  424.         if (!$this->referencias->contains($referencia)) {
  425.             $this->referencias[] = $referencia;
  426.             $referencia->setValoracionReloj($this);
  427.         }
  428.         return $this;
  429.     }
  430.     public function removeReferencia(Referencia $referencia): self
  431.     {
  432.         if ($this->referencias->removeElement($referencia)) {
  433.             // set the owning side to null (unless already changed)
  434.             if ($referencia->getValoracionReloj() === $this) {
  435.                 //$referencia->setValoracionReloj(null);
  436.                 $referencia->setDeletedAt(new DateTime('now'));
  437.             }
  438.         }
  439.         return $this;
  440.     }
  441.     public function isRelojCaja(): ?bool
  442.     {
  443.         return $this->relojCaja;
  444.     }
  445.     public function isRelojPapeles(): ?bool
  446.     {
  447.         return $this->relojPapeles;
  448.     }
  449.     public function getRelojInventario(): ?Reloj
  450.     {
  451.         return $this->relojInventario;
  452.     }
  453.     public function setRelojInventario(?Reloj $relojInventario): static
  454.     {
  455.         $this->relojInventario $relojInventario;
  456.         return $this;
  457.     }
  458.     public function getDetalleCompra(): ?DetalleCompra
  459.     {
  460.         return $this->detalleCompra;
  461.     }
  462.     public function setDetalleCompra(?DetalleCompra $detalleCompra): static
  463.     {
  464.         // unset the owning side of the relation if necessary
  465.         if ($detalleCompra === null && $this->detalleCompra !== null) {
  466.             $this->detalleCompra->setValoracionReloj(null);
  467.         }
  468.         // set the owning side of the relation if necessary
  469.         if ($detalleCompra !== null && $detalleCompra->getValoracionReloj() !== $this) {
  470.             $detalleCompra->setValoracionReloj($this);
  471.         }
  472.         $this->detalleCompra $detalleCompra;
  473.         return $this;
  474.     }
  475. }