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")
  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.     /**
  154.      * @ORM\ManyToOne(targetEntity=\App\Entity\Reloj::class, inversedBy="relojesDerivadosValoracion")
  155.      * @ORM\JoinColumn(name="reloj_base_id", referencedColumnName="id")
  156.      */
  157.     private $relojBase;
  158.     public function __construct()
  159.     {
  160.         $this->relojCaja false;
  161.         $this->relojPapeles false;
  162.         $this->costes = new ArrayCollection();
  163.         $this->referencias = new ArrayCollection();
  164.     }
  165.     public function getRelojFotoFile(): ?File
  166.     {
  167.         return $this->relojFotoFile;
  168.     }
  169.     public function setRelojFotoFile(?File $relojFotoFile): self
  170.     {
  171.         $this->relojFotoFile $relojFotoFile;
  172.         if ($relojFotoFile) {
  173.             // if 'updatedAt' is not defined in your entity, use another property
  174.             $this->setUpdatedAt(new \DateTime('now'));
  175.         }
  176.         return $this;
  177.     }
  178.     public function getITP(): ?float
  179.     {
  180.         return $this->ITP;
  181.     }
  182.     public function setITP(?float $ITP): self
  183.     {
  184.         $this->ITP $ITP;
  185.         return $this;
  186.     }
  187.     public function getComision(): ?float
  188.     {
  189.         return $this->comision;
  190.     }
  191.     public function setComision(?float $comision): self
  192.     {
  193.         $this->comision $comision;
  194.         return $this;
  195.     }
  196.     public function getPrecioCoste(): ?float
  197.     {
  198.         return $this->precioCoste;
  199.     }
  200.     public function setPrecioCoste(?float $precioCoste): self
  201.     {
  202.         $this->precioCoste $precioCoste;
  203.         return $this;
  204.     }
  205.     public function getPrecioCosteTotal(): ?float
  206.     {
  207.         return $this->precioCosteTotal;
  208.     }
  209.     public function setPrecioCosteTotal(?float $precioCosteTotal): self
  210.     {
  211.         $this->precioCosteTotal $precioCosteTotal;
  212.         return $this;
  213.     }
  214.     public function getPrecioMinVenta(): ?float
  215.     {
  216.         return $this->precioMinVenta;
  217.     }
  218.     public function setPrecioMinVenta(?float $precioMinVenta): self
  219.     {
  220.         $this->precioMinVenta $precioMinVenta;
  221.         return $this;
  222.     }
  223.     public function getPrecioPromocion(): ?float
  224.     {
  225.         return $this->precioPromocion;
  226.     }
  227.     public function setPrecioPromocion(?float $precioPromocion): self
  228.     {
  229.         $this->precioPromocion $precioPromocion;
  230.         return $this;
  231.     }
  232.     public function getPrecioOferta(): ?float
  233.     {
  234.         return $this->precioOferta;
  235.     }
  236.     public function setPrecioOferta(?float $precioOferta): self
  237.     {
  238.         $this->precioOferta $precioOferta;
  239.         return $this;
  240.     }
  241.     public function getPrecioReferencia(): ?float
  242.     {
  243.         return $this->precioReferencia;
  244.     }
  245.     public function setPrecioReferencia(?float $precioReferencia): self
  246.     {
  247.         $this->precioReferencia $precioReferencia;
  248.         return $this;
  249.     }
  250.     public function getPrecioPagar(): ?float
  251.     {
  252.         return $this->precioPagar;
  253.     }
  254.     public function setPrecioPagar(?float $precioPagar): self
  255.     {
  256.         $this->precioPagar $precioPagar;
  257.         return $this;
  258.     }
  259.     public function getMargenMinimo(): ?float
  260.     {
  261.         return $this->margenMinimo;
  262.     }
  263.     public function setMargenMinimo(?float $margenMinimo): self
  264.     {
  265.         $this->margenMinimo $margenMinimo;
  266.         return $this;
  267.     }
  268.     public function getMargenDeseado(): ?float
  269.     {
  270.         return $this->margenDeseado;
  271.     }
  272.     public function setMargenDeseado(?float $margenDeseado): self
  273.     {
  274.         $this->margenDeseado $margenDeseado;
  275.         return $this;
  276.     }
  277.     public function getMargenPromocion(): ?float
  278.     {
  279.         return $this->margenPromocion;
  280.     }
  281.     public function setMargenPromocion(?float $margenPromocion): self
  282.     {
  283.         $this->margenPromocion $margenPromocion;
  284.         return $this;
  285.     }
  286.     public function getIsPrecioChrono24(): ?bool
  287.     {
  288.         return $this->isPrecioChrono24;
  289.     }
  290.     public function setIsPrecioChrono24(?bool $isPrecioChrono24): self
  291.     {
  292.         $this->isPrecioChrono24 $isPrecioChrono24;
  293.         return $this;
  294.     }
  295.     public function getRelojIDPerseo(): ?string
  296.     {
  297.         return $this->relojIDPerseo;
  298.     }
  299.     public function setRelojIDPerseo(?string $relojIDPerseo): self
  300.     {
  301.         $this->relojIDPerseo $relojIDPerseo;
  302.         return $this;
  303.     }
  304.     public function getRelojFoto(): ?string
  305.     {
  306.         return $this->relojFoto;
  307.     }
  308.     public function setRelojFoto(?string $relojFoto): self
  309.     {
  310.         $this->relojFoto $relojFoto;
  311.         return $this;
  312.     }
  313.     public function getRelojModelo1(): ?string
  314.     {
  315.         return $this->relojModelo1;
  316.     }
  317.     public function setRelojModelo1(?string $relojModelo): self
  318.     {
  319.         $this->relojModelo1 $relojModelo;
  320.         return $this;
  321.     }
  322.     public function getRelojRef1(): ?string
  323.     {
  324.         return $this->relojRef1;
  325.     }
  326.     public function setRelojRef1(?string $relojRef): self
  327.     {
  328.         $this->relojRef1 $relojRef;
  329.         return $this;
  330.     }
  331.     public function getRelojFecha(): ?int
  332.     {
  333.         return $this->relojFecha;
  334.     }
  335.     public function setRelojFecha(?int $relojFecha): self
  336.     {
  337.         $this->relojFecha $relojFecha;
  338.         return $this;
  339.     }
  340.     public function getRelojCaja(): ?bool
  341.     {
  342.         return $this->relojCaja;
  343.     }
  344.     public function setRelojCaja(bool $relojCaja): self
  345.     {
  346.         $this->relojCaja $relojCaja;
  347.         return $this;
  348.     }
  349.     public function getRelojPapeles(): ?bool
  350.     {
  351.         return $this->relojPapeles;
  352.     }
  353.     public function setRelojPapeles(bool $relojPapeles): self
  354.     {
  355.         $this->relojPapeles $relojPapeles;
  356.         return $this;
  357.     }
  358.     public function getRelojMarca(): ?Marca
  359.     {
  360.         return $this->relojMarca;
  361.     }
  362.     public function setRelojMarca(?Marca $relojMarca): self
  363.     {
  364.         $this->relojMarca $relojMarca;
  365.         return $this;
  366.     }
  367.     public function getRelojAspecto(): ?EstadoAspecto
  368.     {
  369.         return $this->relojAspecto;
  370.     }
  371.     public function setRelojAspecto(?EstadoAspecto $relojAspecto): self
  372.     {
  373.         $this->relojAspecto $relojAspecto;
  374.         return $this;
  375.     }
  376.     public function getValoracion(): ?Valoracion
  377.     {
  378.         return $this->valoracion;
  379.     }
  380.     public function setValoracion(?Valoracion $valoracion): self
  381.     {
  382.         $this->valoracion $valoracion;
  383.         return $this;
  384.     }
  385.     /**
  386.      * @return Collection|Coste[]
  387.      */
  388.     public function getCostes(): Collection
  389.     {
  390.         return $this->costes;
  391.     }
  392.     public function addCoste(Coste $coste): self
  393.     {
  394.         if (!$this->costes->contains($coste)) {
  395.             $this->costes[] = $coste;
  396.             $coste->setValoracionesRelojes($this);
  397.         }
  398.         return $this;
  399.     }
  400.     public function removeCoste(Coste $coste): self
  401.     {
  402.         if ($this->costes->removeElement($coste)) {
  403.             // set the owning side to null (unless already changed)
  404.             if ($coste->getValoracionesRelojes() === $this) {
  405.                 //$coste->setValoracionesRelojes(null);
  406.                 $coste->setDeletedAt(new DateTime('now'));
  407.             }
  408.         }
  409.         return $this;
  410.     }
  411.     public function getCostesTotal(): ?float
  412.     {
  413.         return $this->costesTotal;
  414.     }
  415.     public function setCostesTotal(?float $costesTotal): self
  416.     {
  417.         $this->costesTotal $costesTotal;
  418.         return $this;
  419.     }
  420.     /**
  421.      * @return Collection|Referencia[]
  422.      */
  423.     public function getReferencias(): Collection
  424.     {
  425.         return $this->referencias;
  426.     }
  427.     public function addReferencia(Referencia $referencia): self
  428.     {
  429.         if (!$this->referencias->contains($referencia)) {
  430.             $this->referencias[] = $referencia;
  431.             $referencia->setValoracionReloj($this);
  432.         }
  433.         return $this;
  434.     }
  435.     public function removeReferencia(Referencia $referencia): self
  436.     {
  437.         if ($this->referencias->removeElement($referencia)) {
  438.             // set the owning side to null (unless already changed)
  439.             if ($referencia->getValoracionReloj() === $this) {
  440.                 //$referencia->setValoracionReloj(null);
  441.                 $referencia->setDeletedAt(new DateTime('now'));
  442.             }
  443.         }
  444.         return $this;
  445.     }
  446.     public function isRelojCaja(): ?bool
  447.     {
  448.         return $this->relojCaja;
  449.     }
  450.     public function isRelojPapeles(): ?bool
  451.     {
  452.         return $this->relojPapeles;
  453.     }
  454.     public function getRelojInventario(): ?Reloj
  455.     {
  456.         return $this->relojInventario;
  457.     }
  458.     public function setRelojInventario(?Reloj $relojInventario): static
  459.     {
  460.         $this->relojInventario $relojInventario;
  461.         return $this;
  462.     }
  463.     public function getDetalleCompra(): ?DetalleCompra
  464.     {
  465.         return $this->detalleCompra;
  466.     }
  467.     public function setDetalleCompra(?DetalleCompra $detalleCompra): static
  468.     {
  469.         // unset the owning side of the relation if necessary
  470.         if ($detalleCompra === null && $this->detalleCompra !== null) {
  471.             $this->detalleCompra->setValoracionReloj(null);
  472.         }
  473.         // set the owning side of the relation if necessary
  474.         if ($detalleCompra !== null && $detalleCompra->getValoracionReloj() !== $this) {
  475.             $detalleCompra->setValoracionReloj($this);
  476.         }
  477.         $this->detalleCompra $detalleCompra;
  478.         return $this;
  479.     }
  480.     public function getRelojBase(): ?Reloj
  481.     {
  482.         return $this->relojBase;
  483.     }
  484.     public function setRelojBase(?Reloj $relojBase): static
  485.     {
  486.         $this->relojBase $relojBase;
  487.         return $this;
  488.     }
  489. }