src/Entity/IndexUpdate.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity
  6.  */
  7. class IndexUpdate
  8. {
  9.     /**
  10.      * @ORM\Id
  11.      * @ORM\Column(type="integer")
  12.      * @ORM\GeneratedValue
  13.      *
  14.      * @var int
  15.      */
  16.     protected $id;
  17.     /**
  18.      * @ORM\Column(type="integer")
  19.      *
  20.      * @var int
  21.      */
  22.     protected $customerNumber;
  23.     /**
  24.      * @ORM\Column(type="string")
  25.      *
  26.      * @var string
  27.      */
  28.     protected $stationId;
  29.     /**
  30.      * @ORM\Column(type="float")
  31.      *
  32.      * @var float
  33.      */
  34.     protected $value;
  35.     /**
  36.      * @ORM\Column(type="string", nullable=true)
  37.      *
  38.      * @var string
  39.      */
  40.     protected $picture;
  41.     /**
  42.      * @ORM\Column(type="datetime", nullable=true)
  43.      *
  44.      * @var \DateTime
  45.      */
  46.     protected $date;
  47.     /**
  48.      * IndexUpdate constructor.
  49.      */
  50.     public function __construct()
  51.     {
  52.         try {
  53.             $this->date = new \DateTime();
  54.         } catch (\Exception $exception) {
  55.             // do nothing if date can't be set
  56.         }
  57.     }
  58.     public function getId(): int
  59.     {
  60.         return $this->id;
  61.     }
  62.     /**
  63.      * @return IndexUpdate
  64.      */
  65.     public function setId(int $id): self
  66.     {
  67.         $this->id $id;
  68.         return $this;
  69.     }
  70.     public function getCustomerNumber(): int
  71.     {
  72.         return $this->customerNumber;
  73.     }
  74.     /**
  75.      * @return IndexUpdate
  76.      */
  77.     public function setCustomerNumber(int $customerNumber): self
  78.     {
  79.         $this->customerNumber $customerNumber;
  80.         return $this;
  81.     }
  82.     public function getStationId(): ?string
  83.     {
  84.         return $this->stationId;
  85.     }
  86.     /**
  87.      * @return IndexUpdate
  88.      */
  89.     public function setStationId(?string $stationId): self
  90.     {
  91.         $this->stationId $stationId;
  92.         return $this;
  93.     }
  94.     public function getValue(): ?float
  95.     {
  96.         return $this->value;
  97.     }
  98.     /**
  99.      * @return IndexUpdate
  100.      */
  101.     public function setValue(?float $value): self
  102.     {
  103.         $this->value $value;
  104.         return $this;
  105.     }
  106.     public function getPicture(): ?string
  107.     {
  108.         return $this->picture;
  109.     }
  110.     /**
  111.      * @return IndexUpdate
  112.      */
  113.     public function setPicture(?string $picture): self
  114.     {
  115.         $this->picture $picture;
  116.         return $this;
  117.     }
  118.     public function getDate(): \DateTime
  119.     {
  120.         return $this->date;
  121.     }
  122.     /**
  123.      * @return IndexUpdate
  124.      */
  125.     public function setDate(\DateTime $date): self
  126.     {
  127.         $this->date $date;
  128.         return $this;
  129.     }
  130. }