src/CasinoBundle/Entity/BonusAmount.php line 29

Open in your IDE?
  1. <?php
  2. namespace App\CasinoBundle\Entity;
  3. use App\CmsBundle\Entity\PublishedTrait;
  4. use App\CmsBundle\Entity\SlugTrait;
  5. use App\CmsBundle\Entity\TimeStampedTrait;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * BonusAmount
  11.  *
  12.  * @ORM\Table(
  13.  *     name="bonus_amount",
  14.  *     indexes={
  15.  *        @ORM\Index(name="type_index", columns={"type"}),
  16.  *        @ORM\Index(name="bonus_amaount_published_index", columns={"published"})
  17.  *     },
  18.  *     uniqueConstraints={
  19.  *        @ORM\UniqueConstraint(name="bonus_amount_slug_uindex", columns={"slug"})
  20.  *     }
  21.  * )
  22.  * @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\BonusAmountRepository")
  23.  * @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="one_day")
  24.  * @ORM\HasLifecycleCallbacks()
  25.  */
  26. class BonusAmount
  27. {
  28.     use AliasTrait;
  29.     use SlugTrait;
  30.     use SignTrait;
  31.     use PublishedTrait;
  32.     use TimeStampedTrait;
  33.     /**
  34.      * @var int
  35.      *
  36.      * @ORM\Column(name="id", type="integer", nullable=false)
  37.      * @ORM\Id
  38.      * @ORM\GeneratedValue(strategy="IDENTITY")
  39.      */
  40.     private $id;
  41.     /**
  42.      * @var string|null
  43.      *
  44.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  45.      */
  46.     private $name;
  47.     /**
  48.      * @var int|null
  49.      *
  50.      * @ORM\Column(name="amount", type="integer", nullable=true)
  51.      */
  52.     private $amount;
  53.     /**
  54.      * @var int|null
  55.      *
  56.      * @ORM\Column(name="amount_max", type="integer", nullable=true)
  57.      */
  58.     private $amountMax;
  59.     /**
  60.      * @var string|null
  61.      *
  62.      * @ORM\Column(name="type", type="string", length=255, nullable=true)
  63.      */
  64.     private $type;
  65.     /**
  66.      * @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Alias", mappedBy="bonusAmount", cascade={"persist"}, orphanRemoval=true)
  67.      */
  68.     private Collection $aliases;
  69.     public function __construct()
  70.     {
  71.         $this->aliases = new ArrayCollection();
  72.     }
  73.     public function __toString()
  74.     {
  75.         return $this->name;
  76.     }
  77.     public function getId(): ?int
  78.     {
  79.         return $this->id;
  80.     }
  81.     public function setId(int $id): self
  82.     {
  83.         $this->id $id;
  84.         return $this;
  85.     }
  86.     public function getName(): ?string
  87.     {
  88.         return $this->name;
  89.     }
  90.     public function setName(?string $name): self
  91.     {
  92.         $this->name $name;
  93.         return $this;
  94.     }
  95.     public function getAmount(): ?int
  96.     {
  97.         return $this->amount;
  98.     }
  99.     public function setAmount(?int $amount): self
  100.     {
  101.         $this->amount $amount;
  102.         return $this;
  103.     }
  104.     public function getAmountMax(): ?int
  105.     {
  106.         return $this->amountMax;
  107.     }
  108.     public function setAmountMax(?int $amount): self
  109.     {
  110.         $this->amountMax $amount;
  111.         return $this;
  112.     }
  113.     public function getType(): ?string
  114.     {
  115.         return $this->type;
  116.     }
  117.     public function setType(?string $type): self
  118.     {
  119.         $this->type $type;
  120.         return $this;
  121.     }
  122. }