src/Entity/Alerta.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Alerta
  6.  *
  7.  * @ORM\Table(name="alerta")
  8.  * @ORM\Entity(repositoryClass="App\Repository\AlertaRepository")
  9.  */
  10. class Alerta
  11. {
  12.     /**
  13.      * @var integer
  14.      *
  15.      * @ORM\Column(name="id", type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     private $id;
  20.     /**
  21.     * @ORM\ManyToOne(targetEntity="User", inversedBy="alerts")
  22.     * @ORM\JoinColumn(name="usuario", referencedColumnName="id")
  23.     */
  24.     private $usuario;
  25.     /**
  26.      * @var \DateTime
  27.      *
  28.      * @ORM\Column(name="fechaInicio", type="date")
  29.      */
  30.     private $fechaInicio;
  31.     /**
  32.      * @var \DateTime
  33.      *
  34.      * @ORM\Column(name="fechaFin", type="date", nullable=true)
  35.      */
  36.     private $fechaFin;
  37.     /**
  38.     * @ORM\ManyToOne(targetEntity="Divisa")
  39.     * @ORM\JoinColumn(name="divisa", referencedColumnName="id")
  40.     */
  41.     private $divisa;
  42.     /**
  43.     * @ORM\ManyToOne(targetEntity="Oficina")
  44.     * @ORM\JoinColumn(name="oficina", referencedColumnName="id")
  45.     */
  46.     private $oficina;
  47.     /**
  48.      * @var float
  49.      *
  50.      * @ORM\Column(name="precioMinimo", type="float", nullable=true)
  51.      */
  52.     private $precioMinimo;
  53.     /**
  54.      * @var float
  55.      *
  56.      * @ORM\Column(name="activo", type="boolean")
  57.      */
  58.     private $activo;
  59.     /**
  60.      * @var string
  61.      *
  62.      * @ORM\Column(name="frecuencia", type="string", length=5)
  63.      */
  64.     private $frecuencia;
  65.     
  66.     /**
  67.      * @var boolean
  68.      *
  69.      * @ORM\Column(name="tipo", type="boolean")
  70.      */
  71.     private $tipo;
  72.     // Si es 0 es compra y si es 1 es venta
  73.     /**
  74.      * Get id
  75.      *
  76.      * @return integer
  77.      */
  78.     public function getId()
  79.     {
  80.         return $this->id;
  81.     }
  82.     /**
  83.      * Set usuario
  84.      *
  85.      * @param integer $usuario
  86.      * @return Alerta
  87.      */
  88.     public function setUsuario($usuario)
  89.     {
  90.         $this->usuario $usuario;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get usuario
  95.      *
  96.      * @return integer
  97.      */
  98.     public function getUsuario()
  99.     {
  100.         return $this->usuario;
  101.     }
  102.     /**
  103.      * Set fechaInicio
  104.      *
  105.      * @param \DateTime $fechaInicio
  106.      * @return Alerta
  107.      */
  108.     public function setFechaInicio($fechaInicio)
  109.     {
  110.         $this->fechaInicio $fechaInicio;
  111.         return $this;
  112.     }
  113.     /**
  114.      * Get fechaInicio
  115.      *
  116.      * @return \DateTime
  117.      */
  118.     public function getFechaInicio()
  119.     {
  120.         return $this->fechaInicio;
  121.     }
  122.     /**
  123.      * Set fechaFin
  124.      *
  125.      * @param \DateTime $fechaFin
  126.      * @return Alerta
  127.      */
  128.     public function setFechaFin($fechaFin)
  129.     {
  130.         $this->fechaFin $fechaFin;
  131.         return $this;
  132.     }
  133.     /**
  134.      * Get fechaFin
  135.      *
  136.      * @return \DateTime
  137.      */
  138.     public function getFechaFin()
  139.     {
  140.         return $this->fechaFin;
  141.     }
  142.     /**
  143.      * Set divisa
  144.      *
  145.      * @param integer $divisa
  146.      * @return Alerta
  147.      */
  148.     public function setDivisa($divisa)
  149.     {
  150.         $this->divisa $divisa;
  151.         return $this;
  152.     }
  153.     /**
  154.      * Set oficina
  155.      *
  156.      * @param float $oficina
  157.      * @return Alerta
  158.      */
  159.     public function setOficina($oficina)
  160.     {
  161.         $this->oficina $oficina;
  162.         return $this;
  163.     }
  164.     /**
  165.      * Get oficina
  166.      *
  167.      * @return Alerta
  168.      */
  169.     public function getOficina()
  170.     {
  171.           return $this->oficina;
  172.     }
  173.     /**
  174.      * Get divisa
  175.      *
  176.      * @return integer
  177.      */
  178.     public function getDivisa()
  179.     {
  180.         return $this->divisa;
  181.     }
  182.     /**
  183.      * Set precioMinimo
  184.      *
  185.      * @param float $precioMinimo
  186.      * @return Alerta
  187.      */
  188.     public function setPrecioMinimo($precioMinimo)
  189.     {
  190.         $this->precioMinimo $precioMinimo;
  191.         return $this;
  192.     }
  193.     /**
  194.      * Get precioMinimo
  195.      *
  196.      * @return float
  197.      */
  198.     public function getPrecioMinimo()
  199.     {
  200.         return $this->precioMinimo;
  201.     }
  202.     /**
  203.      * Set activo
  204.      *
  205.      * @param boolean $activo
  206.      * @return Alerta
  207.      */
  208.     public function setActivo($activo)
  209.     {
  210.         $this->activo $activo;
  211.         return $this;
  212.     }
  213.     /**
  214.      * Get activo
  215.      *
  216.      * @return float
  217.      */
  218.     public function getActivo()
  219.     {
  220.         return $this->activo;
  221.     }
  222.     /**
  223.      * Set frecuencia
  224.      *
  225.      * @param string $activo
  226.      * @return Alerta
  227.      */
  228.     public function setFrecuencia($frecuencia)
  229.     {
  230.         $this->frecuencia $frecuencia;
  231.         return $this;
  232.     }
  233.     /**
  234.      * Get frecuencia
  235.      *
  236.      * @return string
  237.      */
  238.     public function getFrecuencia()
  239.     {
  240.         return $this->frecuencia;
  241.     }
  242.     
  243.     /**
  244.      * Set tipo
  245.      *
  246.      * @param boolean $tipo
  247.      * @return Carro
  248.      */
  249.     public function setTipo($tipo)
  250.     {
  251.         $this->tipo $tipo;
  252.         return $this;
  253.     }
  254.     /**
  255.      * Get tipo
  256.      *
  257.      * @return boolean
  258.      */
  259.     public function getTipo()
  260.     {
  261.         return $this->tipo;
  262.     }
  263. }