<?php
namespace App\CmsBundle\Entity;
use App\CasinoBundle\Entity\Country;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Ctr
*
* @ORM\Table(
* name="ctr",
* indexes={
* @ORM\Index(
* name="ctr_page",
* columns={"page_id"}
* ),
* @ORM\Index(
* name="ctr_country",
* columns={"country_id"}
* )
* }
* )
* @ORM\Entity(repositoryClass="App\CmsBundle\Repository\CtrRepository")
*/
class Ctr
{
use IdTrait;
/**
* @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Page", inversedBy="ctr")
* @ORM\JoinColumn(name="page_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private $page;
/**
* @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Country")
* @ORM\JoinColumn(name="country_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private $country;
/**
* @var integer
* @ORM\Column(name="value", type="float", nullable=false, options={"default" : 0})
*/
private $value;
public function __construct()
{
}
/**
* @param Page|null $page
* @return $this
*/
public function setPage(?Page $page): self
{
$this->page = $page;
return $this;
}
/**
* @return Page|null
*/
public function getPage(): ?Page
{
return $this->page;
}
/**
* @param Country|null $country
* @return $this
*/
public function setCountry(?Country $country): self
{
$this->country = $country;
return $this;
}
/**
* @return Country|null
*/
public function getCountry(): ?Country
{
return $this->country;
}
/**
* @return bool
*/
public function getValue(): bool
{
return $this->value;
}
/**
* @param float $value
* @return $this
*/
public function setValue(float $value): self
{
$this->value = $value;
return $this;
}
}