src/CasinoBundle/Entity/Vote.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\CasinoBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\CmsBundle\Entity\IdTrait;
  5. /**
  6.  * Vote
  7.  *
  8.  * @ORM\Table(
  9.  *     name="vote",
  10.  *     indexes={
  11.  *         @ORM\Index(name="vote_url_index", columns={"url"}),
  12.  *         @ORM\Index(name="vote_ip_index", columns={"ip"})
  13.  *     },
  14.  *     uniqueConstraints={
  15.  *         @ORM\UniqueConstraint(name="vote_ip_url_uindex", columns={"url","ip"})
  16.  *     }
  17.  * )
  18.  * @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\VoteRepository")
  19.  */
  20. class Vote
  21. {
  22.     use IdTraitIpTraitUrlTrait;
  23.     /**
  24.      * @var integer|null
  25.      *
  26.      * @ORM\Column(name="value", type="integer", nullable=false)
  27.      */
  28.     public $value;
  29.     public function getValue(): ?int
  30.     {
  31.         return $this->value;
  32.     }
  33.     public function setValue(int $value): self
  34.     {
  35.         $this->value $value;
  36.         return $this;
  37.     }
  38. }