src/Entity/Webmaster.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\ORM\Mapping\JoinColumn;
  5. use Doctrine\ORM\Mapping\OneToOne;
  6. use JMS\Serializer\Annotation\Groups;
  7. /**
  8.  * @ORM\Table("Webmaster")
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\Repository\WebmasterRepository")
  11.  */
  12. class Webmaster
  13. {
  14.     /**
  15.      * @Groups({"adminindex", "trafficindex"})
  16.      *
  17.      * @ORM\Id()
  18.      *
  19.      * @ORM\GeneratedValue()
  20.      *
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @Groups({"webmasterdetail", "trafficindex"})
  26.      *
  27.      * @OneToOne(targetEntity="Account", mappedBy="webmaster")
  28.      */
  29.     protected $account;
  30.     /**
  31.      * @Groups({"webmasterindex", "webmasterdetail"})
  32.      *
  33.      * @OneToOne(targetEntity="Person", cascade={"persist"})
  34.      *
  35.      * @JoinColumn(name="person_id", referencedColumnName="id", onDelete="SET NULL")
  36.      */
  37.     protected $person;
  38.     /**
  39.      * @Groups({"webmasterdetail"})
  40.      *
  41.      * @ORM\Column(type="smallint")
  42.      */
  43.     private $provision_percent 25;
  44.     /**
  45.      * @Groups({"webmasterdetail"})
  46.      *
  47.      * @ORM\Column(type="boolean")
  48.      */
  49.     private $is_active true;
  50.     /**
  51.      * @Groups({"webmasterdetail"})
  52.      *
  53.      * @ORM\Column(type="smallint")
  54.      */
  55.     private $amateur_provision_percent 5;
  56.     /**
  57.      * @Groups({"webmasterdetail"})
  58.      *
  59.      * @ORM\Column(type="smallint")
  60.      */
  61.     private $webmaster_provision_percent 5;
  62.     public function getId()
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function setId(int $id): self
  67.     {
  68.         $this->id $id;
  69.         return $this;
  70.     }
  71.     public function getProvisionPercent(): ?int
  72.     {
  73.         return $this->provision_percent;
  74.     }
  75.     public function setProvisionPercent(int $provision_percent): self
  76.     {
  77.         $this->provision_percent $provision_percent;
  78.         return $this;
  79.     }
  80.     public function getIsActive(): ?bool
  81.     {
  82.         return $this->is_active;
  83.     }
  84.     public function setIsActive(bool $is_active): self
  85.     {
  86.         $this->is_active $is_active;
  87.         return $this;
  88.     }
  89.     public function getAmateurProvisionPercent(): ?int
  90.     {
  91.         return $this->amateur_provision_percent;
  92.     }
  93.     public function setAmateurProvisionPercent(int $amateur_provision_percent): self
  94.     {
  95.         $this->amateur_provision_percent $amateur_provision_percent;
  96.         return $this;
  97.     }
  98.     public function getWebmasterProvisionPercent(): ?int
  99.     {
  100.         return $this->webmaster_provision_percent;
  101.     }
  102.     public function setWebmasterProvisionPercent(int $webmaster_provision_percent): self
  103.     {
  104.         $this->webmaster_provision_percent $webmaster_provision_percent;
  105.         return $this;
  106.     }
  107.     public function setPerson(?Person $person): self
  108.     {
  109.         $this->person $person;
  110.         return $this;
  111.     }
  112.     public function getPerson(): ?Person
  113.     {
  114.         return $this->person;
  115.     }
  116.     public function getAccount(): ?Account
  117.     {
  118.         return $this->account;
  119.     }
  120.     public function setAccount(Account $account): self
  121.     {
  122.         $this->account $account;
  123.         return $this;
  124.     }
  125. }