src/CasinoBundle/Entity/BonusTitle.php line 24

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\CasinoBundle\Entity;
  4. use App\CmsBundle\Entity\IdTrait;
  5. use App\CmsBundle\Entity\Route;
  6. use App\CmsBundle\Entity\TitleTrait;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\BonusTitleRepository")
  10.  * @ORM\Table(
  11.  *     name="bonus_title",
  12.  *     uniqueConstraints={
  13.  *         @ORM\UniqueConstraint(
  14.  *             name="uniq_bonus_route_country",
  15.  *             columns={"new_bonus_id", "route_id", "country_id"}
  16.  *         )
  17.  *     }
  18.  * )
  19.  */
  20. class BonusTitle
  21. {
  22.     use IdTrait,
  23.         TitleTrait;
  24.     /**
  25.      *
  26.      * @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\NewBonus", inversedBy="titles")
  27.      * @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
  28.      */
  29.     private ?NewBonus $bonus null;
  30.     /**
  31.      *
  32.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Route")
  33.      * @ORM\JoinColumn(name="route_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  34.      */
  35.     private Route $route;
  36.     /**
  37.      *
  38.      * @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Country")
  39.      * @ORM\JoinColumn(name="country_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  40.      */
  41.     private Country $country;
  42.     /**
  43.      * @return NewBonus
  44.      */
  45.     public function getBonus(): NewBonus
  46.     {
  47.         return $this->bonus;
  48.     }
  49.     /**
  50.      * @param ?NewBonus $bonus
  51.      * @return $this
  52.      */
  53.     public function setBonus(?NewBonus $bonus): self
  54.     {
  55.         $this->bonus $bonus;
  56.         return $this;
  57.     }
  58.     /**
  59.      * @return Route
  60.      */
  61.     public function getRoute(): Route
  62.     {
  63.         return $this->route;
  64.     }
  65.     /**
  66.      * @param Route $route
  67.      * @return $this
  68.      */
  69.     public function setRoute(Route $route): self
  70.     {
  71.         $this->route $route;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return Country
  76.      */
  77.     public function getCountry(): Country
  78.     {
  79.         return $this->country;
  80.     }
  81.     /**
  82.      * @param Country $country
  83.      * @return $this
  84.      */
  85.     public function setCountry(Country $country): self
  86.     {
  87.         $this->country $country;
  88.         return $this;
  89.     }
  90. }