src/Entity/UsageStatistic.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * UsageStatistic
  6.  *
  7.  * @ORM\Table(name="usage_statistic")
  8.  * @ORM\Entity(repositoryClass="App\Repository\UsageStatisticRepository")
  9.  */
  10. class UsageStatistic
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(name="eventType", type="integer")
  20.      */
  21.     private $eventType;
  22.     /**
  23.      * @ORM\Column(type="bigint")
  24.      */
  25.     private $quantite;
  26.     /**
  27.      * @ORM\Column(type="date")
  28.      */
  29.     private $date;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="usageStatistics")
  32.      * @ORM\JoinColumns({
  33.      *   @ORM\JoinColumn(name="entity_id", referencedColumnName="id")
  34.      * })
  35.      */
  36.     private $entity;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\Site", inversedBy="usageStatistics")
  39.      * @ORM\JoinColumns({
  40.      *   @ORM\JoinColumn(name="site_id", referencedColumnName="id")
  41.      * })
  42.      */
  43.     private $site;
  44.     public function __construct()
  45.     {
  46.         $this->date = new \DateTime();
  47.     }
  48.     /**
  49.      * @return int
  50.      */
  51.     public function getId(): int
  52.     {
  53.         return $this->id;
  54.     }
  55.     /**
  56.      * @return mixed
  57.      */
  58.     public function getEventType()
  59.     {
  60.         return $this->eventType;
  61.     }
  62.     /**
  63.      * @param mixed $eventType
  64.      */
  65.     public function setEventType($eventType): void
  66.     {
  67.         $this->eventType $eventType;
  68.     }
  69.     /**
  70.      * @return int
  71.      */
  72.     public function getQuantite() : ?int
  73.     {
  74.         return $this->quantite;
  75.     }
  76.     public function setQuantite(?int $quantite) : self
  77.     {
  78.         $this->quantite $quantite;
  79.         return $this;
  80.     }
  81.     public function getDate(): ?\DateTimeInterface
  82.     {
  83.         return $this->date;
  84.     }
  85.     public function getEntity(): ?DnsitEntity
  86.     {
  87.         return $this->entity;
  88.     }
  89.     public function setEntity(?DnsitEntity $entity): self
  90.     {
  91.         $this->entity $entity;
  92.         return $this;
  93.     }
  94.     public function getSite(): ?Site
  95.     {
  96.         return $this->site;
  97.     }
  98.     public function setSite(?Site $site): self
  99.     {
  100.         $this->site $site;
  101.         return $this;
  102.     }
  103. }