src/ProfileBundle/Entity/UserCasino.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\ProfileBundle\Entity;
  3. use App\CasinoBundle\Entity\Casino;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(
  7.  *     name="user_casino",
  8.  * )
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\ProfileBundle\Repository\UserCasinoRepository")
  11.  */
  12. class UserCasino
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\Column(type="integer", options={"unsigned":true},  nullable=true)
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     protected int $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Casino")
  22.      * @ORM\JoinColumn(name="casino_id", referencedColumnName="id")
  23.      */
  24.     private Casino $casino;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\ProfileBundle\Entity\User")
  27.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  28.      */
  29.     private User $user;
  30.     /**
  31.      * @return ?Casino
  32.      */
  33.     public function getCasino(): ?Casino
  34.     {
  35.         return $this->casino;
  36.     }
  37.     /**
  38.      * @param ?Casino $casino
  39.      * @return $this
  40.      */
  41.     public function setCasino(?Casino $casino): self
  42.     {
  43.         $this->casino $casino;
  44.         return $this;
  45.     }
  46.     /**
  47.      * @return ?User
  48.      */
  49.     public function getUser(): ?User
  50.     {
  51.         return $this->user;
  52.     }
  53.     /**
  54.      * @param ?User $user
  55.      * @return $this
  56.      */
  57.     public function setUser(?User $user): self
  58.     {
  59.         $this->user $user;
  60.         return $this;
  61.     }
  62. }