src/Entity/ContentAnalyticsCorrectionDaily.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\ContentAnalyticsCorrectionDailyRepository")
  6.  */
  7. class ContentAnalyticsCorrectionDaily
  8. {
  9.     
  10.     /**
  11.      * @ORM\Column(type="datetime")
  12.      */
  13.     private $day;
  14.     //Should also have @ ORM\Id, but causing issues because it requires toString
  15.     
  16.     
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\ManyToOne(targetEntity="App\Entity\Content", inversedBy="content_analytics_correction_daily", cascade={"persist"})
  20.      * @ORM\JoinColumn(name="content_id", referencedColumnName="id", onDelete="CASCADE")
  21.      */
  22.     private $content;
  23.     
  24.     /**
  25.      * @ORM\Column(type="integer")
  26.      */
  27.     private $impressions;
  28.     
  29.     /**
  30.      * @ORM\Column(type="integer")
  31.      */
  32.     private $views;
  33.     
  34.     /**
  35.      * @ORM\Column(type="integer")
  36.      */
  37.     private $site_id;
  38.     
  39.     public function __construct()
  40.     {
  41.         $this->impressions 0;
  42.         $this->views 0;
  43.         //$this->day = new \DateTime();
  44.     }
  45.     
  46.     public function getDay(): \DateTimeInterface
  47.     {
  48.         return $this->day;
  49.     }
  50.     
  51.     public function setDay(\DateTimeInterface $day): self
  52.     {
  53.         $this->day $day;
  54.         return $this;
  55.     }
  56.     
  57.     public function getContent(): Content
  58.     {
  59.         return $this->content;
  60.     }
  61.     public function setContent(Content $content): self
  62.     {
  63.         $this->content $content;
  64.         return $this;
  65.     }
  66.     
  67.     public function getImpressions(): int
  68.     {
  69.         return $this->impressions;
  70.     }
  71.     
  72.     public function setImpressions(int $impressions): self
  73.     {
  74.         $this->impressions $impressions;
  75.         return $this;
  76.     }
  77.     
  78.     public function getViews(): int
  79.     {
  80.         return $this->views;
  81.     }
  82.     
  83.     public function setViews(int $views): self
  84.     {
  85.         $this->views $views;
  86.         return $this;
  87.     }
  88.     
  89.     public function getSiteId(): int
  90.     {
  91.         return $this->site_id;
  92.     }
  93.     
  94.     public function setSiteId(int $site_id): self
  95.     {
  96.         $this->site_id $site_id;
  97.         return $this;
  98.     }
  99.     
  100. }