src/CmsBundle/Entity/Ctr.php line 27

Open in your IDE?
  1. <?php
  2. namespace App\CmsBundle\Entity;
  3. use App\CasinoBundle\Entity\Country;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Ctr
  8.  *
  9.  * @ORM\Table(
  10.  *     name="ctr",
  11.  *     indexes={
  12.  *         @ORM\Index(
  13.  *              name="ctr_page",
  14.  *              columns={"page_id"}
  15.  *         ),
  16.  *         @ORM\Index(
  17.  *              name="ctr_country",
  18.  *              columns={"country_id"}
  19.  *         )
  20.  *     }
  21.  * )
  22.  * @ORM\Entity(repositoryClass="App\CmsBundle\Repository\CtrRepository")
  23.  */
  24. class Ctr
  25. {
  26.     use IdTrait;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Page", inversedBy="ctr")
  29.      * @ORM\JoinColumn(name="page_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  30.      */
  31.     private $page;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Country")
  34.      * @ORM\JoinColumn(name="country_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  35.      */
  36.     private $country;
  37.     /**
  38.      * @var integer
  39.      * @ORM\Column(name="value", type="float", nullable=false, options={"default" : 0})
  40.      */
  41.     private $value;
  42.     public function __construct()
  43.     {
  44.     }
  45.     /**
  46.      * @param Page|null $page
  47.      * @return $this
  48.      */
  49.     public function setPage(?Page $page): self
  50.     {
  51.         $this->page $page;
  52.         return $this;
  53.     }
  54.     /**
  55.      * @return Page|null
  56.      */
  57.     public function getPage(): ?Page
  58.     {
  59.         return $this->page;
  60.     }
  61.     /**
  62.      * @param Country|null $country
  63.      * @return $this
  64.      */
  65.     public function setCountry(?Country $country): self
  66.     {
  67.         $this->country $country;
  68.         return $this;
  69.     }
  70.     /**
  71.      * @return Country|null
  72.      */
  73.     public function getCountry(): ?Country
  74.     {
  75.         return $this->country;
  76.     }
  77.     /**
  78.      * @return bool
  79.      */
  80.     public function getValue(): bool
  81.     {
  82.         return $this->value;
  83.     }
  84.     /**
  85.      * @param float $value
  86.      * @return $this
  87.      */
  88.     public function setValue(float $value): self
  89.     {
  90.         $this->value $value;
  91.         return $this;
  92.     }
  93. }