src/Entity/Fidelizacion/Cupones.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Fidelizacion;
  3. use App\Entity\Catalogos\TipoCupon;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Cupones
  7.  *
  8.  * @ORM\Table(name="fidelizacion.cupones", indexes={@ORM\Index(name="IDX_FF0AC482FBF9E356", columns={"id_tipo_cupon"})})
  9.  * @ORM\Entity
  10.  */
  11. class Cupones
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="SEQUENCE")
  19.      * @ORM\SequenceGenerator(sequenceName="fidelizacion.cupones_id_seq", allocationSize=1, initialValue=1)
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var \DateTime
  24.      *
  25.      * @ORM\Column(name="fecha_inicio", type="date", nullable=false)
  26.      */
  27.     private $fechaInicio;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="nombre", type="string", nullable=false)
  32.      */
  33.     private $nombre;
  34.     /**
  35.      * @var \DateTime
  36.      *
  37.      * @ORM\Column(name="fecha_fin", type="date", nullable=false)
  38.      */
  39.     private $fechaFin;
  40.     /**
  41.      * @var int|null
  42.      *
  43.      * @ORM\Column(name="porcentaje", type="integer", nullable=true)
  44.      */
  45.     private $porcentaje;
  46.     /**
  47.      * @var string|null
  48.      *
  49.      * @ORM\Column(name="codigo", type="string", length=10, nullable=true)
  50.      */
  51.     private $codigo;
  52.     /**
  53.      * @var bool
  54.      *
  55.      * @ORM\Column(name="unico", type="boolean", nullable=false)
  56.      */
  57.     private $unico;
  58.     /**
  59.      * @var bool
  60.      *
  61.      * @ORM\Column(name="cumpleanios", type="boolean", nullable=false)
  62.      */
  63.     private $cumpleanios;
  64.     /**
  65.      * @var bool
  66.      *
  67.      * @ORM\Column(name="activo", type="boolean", nullable=false)
  68.      */
  69.     private $activo;
  70.     /**
  71.      * @var string|null
  72.      *
  73.      * @ORM\Column(name="imagen", type="string", nullable=true)
  74.      */
  75.     private $imagen;
  76.     /**
  77.      * @var int
  78.      *
  79.      * @ORM\Column(name="id_usuario_modificacion", type="integer", nullable=false)
  80.      */
  81.     private $idUsuarioModificacion;
  82.     /**
  83.      * @var \DateTime|null
  84.      *
  85.      * @ORM\Column(name="fecha_modificacion", type="datetime", nullable=true)
  86.      */
  87.     private $fechaModificacion;
  88.     /**
  89.      * @var string|null
  90.      *
  91.      * @ORM\Column(name="ip_modificacion", type="string", length=50, nullable=true)
  92.      */
  93.     private $ipModificacion;
  94.     /**
  95.      * @var \App\Entity\Catalogos\TipoCupon|null
  96.      *
  97.      * @ORM\ManyToOne(targetEntity="App\Entity\Catalogos\TipoCupon")
  98.      * @ORM\JoinColumns({
  99.      *   @ORM\JoinColumn(name="id_tipo_cupon", referencedColumnName="id")
  100.      * })
  101.      */
  102.     private $idTipoCupon;
  103.     public function getId(): ?int
  104.     {
  105.         return $this->id;
  106.     }
  107.     public function getFechaInicio(): ?\DateTimeInterface
  108.     {
  109.         return $this->fechaInicio;
  110.     }
  111.     public function getFechaInicioString(): ?string
  112.     {
  113.         return $this->fechaInicio?$this->fechaInicio->format('Y-m-d'):'';
  114.     }
  115.     public function setFechaInicio(\DateTimeInterface $fechaInicio): self
  116.     {
  117.         $this->fechaInicio $fechaInicio;
  118.         return $this;
  119.     }
  120.     public function setFechaInicioNull(): self
  121.     {
  122.         $this->fechaInicio null; return $this;
  123.     }
  124.     public function getFechaFin(): ?\DateTimeInterface
  125.     {
  126.         return $this->fechaFin;
  127.     }
  128.     public function getFechaFinString(): ?string
  129.     {
  130.         return $this->fechaFin?$this->fechaFin->format('Y-m-d'):'';
  131.     }
  132.     public function setFechaFin(\DateTimeInterface $fechaFin): self
  133.     {
  134.         $this->fechaFin $fechaFin;
  135.         return $this;
  136.     }
  137.     public function setFechaFinNull(): self
  138.     {
  139.         $this->fechaFin null;
  140.         return $this;
  141.     }
  142.     public function getPorcentaje(): ?int
  143.     {
  144.         return $this->porcentaje;
  145.     }
  146.     public function setPorcentaje(?int $porcentaje): self
  147.     {
  148.         $this->porcentaje $porcentaje;
  149.         return $this;
  150.     }
  151.     public function getCodigo(): ?string
  152.     {
  153.         return $this->codigo;
  154.     }
  155.     public function setCodigo(string $codigo): self
  156.     {
  157.         $this->codigo $codigo?$codigo:null;
  158.         return $this;
  159.     }
  160.     public function getUnico(): ?bool
  161.     {
  162.         return $this->unico;
  163.     }
  164.     public function setUnico(bool $unico): self
  165.     {
  166.         $this->unico $unico;
  167.         return $this;
  168.     }
  169.     public function getActivo(): ?bool
  170.     {
  171.         return $this->activo;
  172.     }
  173.     public function setActivo(bool $activo): self
  174.     {
  175.         $this->activo $activo;
  176.         return $this;
  177.     }
  178.     public function getImagen(): ?string
  179.     {
  180.         return $this->imagen;
  181.     }
  182.     public function setImagen(string $imagen): self
  183.     {
  184.         $this->imagen $imagen!=''?$imagen:null;
  185.         return $this;
  186.     }
  187.     public function getIdUsuarioModificacion(): ?int
  188.     {
  189.         return $this->idUsuarioModificacion;
  190.     }
  191.     public function setIdUsuarioModificacion(int $idUsuarioModificacion): self
  192.     {
  193.         $this->idUsuarioModificacion $idUsuarioModificacion;
  194.         return $this;
  195.     }
  196.     public function getFechaModificacion(): ?\DateTimeInterface
  197.     {
  198.         return $this->fechaModificacion;
  199.     }
  200.     public function setFechaModificacion(\DateTimeInterface $fechaModificacion): self
  201.     {
  202.         $this->fechaModificacion $fechaModificacion;
  203.         return $this;
  204.     }
  205.     public function getIpModificacion(): ?string
  206.     {
  207.         return $this->ipModificacion;
  208.     }
  209.     public function setIpModificacion(?string $ipModificacion): self
  210.     {
  211.         $this->ipModificacion $ipModificacion;
  212.         return $this;
  213.     }
  214.     public function getIdTipoCupon(): ?TipoCupon
  215.     {
  216.         return $this->idTipoCupon;
  217.     }
  218.     public function setIdTipoCupon(?TipoCupon $idTipoCupon): self
  219.     {
  220.         $this->idTipoCupon $idTipoCupon;
  221.         return $this;
  222.     }
  223.     public function getNombre(): ?string
  224.     {
  225.         return $this->nombre;
  226.     }
  227.     public function setNombre(string $nombre): self
  228.     {
  229.         $this->nombre $nombre;
  230.         return $this;
  231.     }
  232.     public function getCumpleanios(): ?bool
  233.     {
  234.         return $this->cumpleanios;
  235.     }
  236.     public function setCumpleanios(bool $cumpleanios): self
  237.     {
  238.         $this->cumpleanios $cumpleanios;
  239.         return $this;
  240.     }
  241. }