<?php
declare(strict_types=1);
namespace App\CasinoBundle\Entity;
use App\CmsBundle\Entity\IdTrait;
use App\CmsBundle\Entity\Route;
use App\CmsBundle\Entity\TitleTrait;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\BonusTitleRepository")
* @ORM\Table(
* name="bonus_title",
* uniqueConstraints={
* @ORM\UniqueConstraint(
* name="uniq_bonus_route_country",
* columns={"new_bonus_id", "route_id", "country_id"}
* )
* }
* )
*/
class BonusTitle
{
use IdTrait,
TitleTrait;
/**
*
* @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\NewBonus", inversedBy="titles")
* @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
*/
private ?NewBonus $bonus = null;
/**
*
* @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Route")
* @ORM\JoinColumn(name="route_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private Route $route;
/**
*
* @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Country")
* @ORM\JoinColumn(name="country_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private Country $country;
/**
* @return NewBonus
*/
public function getBonus(): NewBonus
{
return $this->bonus;
}
/**
* @param ?NewBonus $bonus
* @return $this
*/
public function setBonus(?NewBonus $bonus): self
{
$this->bonus = $bonus;
return $this;
}
/**
* @return Route
*/
public function getRoute(): Route
{
return $this->route;
}
/**
* @param Route $route
* @return $this
*/
public function setRoute(Route $route): self
{
$this->route = $route;
return $this;
}
/**
* @return Country
*/
public function getCountry(): Country
{
return $this->country;
}
/**
* @param Country $country
* @return $this
*/
public function setCountry(Country $country): self
{
$this->country = $country;
return $this;
}
}