src/CasinoBundle/Entity/Traffic.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\CasinoBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use DateTime;
  5. /**
  6.  * Review
  7.  *
  8.  * @ORM\Table(
  9.  *     name="casino_traffic",
  10.  *     indexes={
  11.  *          @ORM\Index(name="traffic_date_index", columns={"date"})
  12.  *     }
  13.  * )
  14.  * @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\TrafficRepository")
  15.  */
  16. class Traffic
  17. {
  18.     use DateTrait;
  19.     /**
  20.      * @var int
  21.      *
  22.      * @ORM\Column(name="id", type="integer", nullable=false)
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="IDENTITY")
  25.      */
  26.     private $id;
  27.     /**
  28.      * @var integer
  29.      *
  30.      * @ORM\Column(name="value", type="integer", nullable=false)
  31.      */
  32.     private $value;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Casino", inversedBy="traffic")
  35.      * @ORM\JoinColumn(nullable=false)
  36.      */
  37.     private $casino;
  38.     public function __toString() : string
  39.     {
  40.         return (string)$this->value;
  41.     }
  42.     /**
  43.      * @return int
  44.      */
  45.     public function getId(): int
  46.     {
  47.         return $this->id;
  48.     }
  49.     /**
  50.      * @param int $id
  51.      */
  52.     public function setId(int $id): void
  53.     {
  54.         $this->id $id;
  55.     }
  56.     public function getValue(): ?int
  57.     {
  58.         return $this->value;
  59.     }
  60.     public function setValue(int $value): self
  61.     {
  62.         $this->value $value;
  63.         return $this;
  64.     }
  65.     public function getCasino(): ?Casino
  66.     {
  67.         return $this->casino;
  68.     }
  69.     public function setCasino(?Casino $casino): self
  70.     {
  71.         $this->casino $casino;
  72.         return $this;
  73.     }
  74. }