src/Entity/MemberOperator.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use JMS\Serializer\Annotation\Groups;
  5. /**
  6.  * @ORM\Table("MemberOperator")
  7.  *
  8.  * @ORM\Entity(repositoryClass="App\Repository\MemberOperatorRepository")
  9.  */
  10. class MemberOperator
  11. {
  12.     /**
  13.      * @Groups({"adminindex", "operatorindex"})
  14.      *
  15.      * @ORM\Id()
  16.      *
  17.      * @ORM\GeneratedValue()
  18.      *
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @Groups({"adminindex"})
  24.      *
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\Member", inversedBy="operators", cascade={"persist"})
  26.      *
  27.      * @ORM\JoinColumn(name="operator_id", referencedColumnName="id", onDelete="CASCADE", nullable=false)
  28.      */
  29.     private ?Member $operator null;
  30.     /**
  31.      * @Groups({"adminindex", "memberfrontendindex"})
  32.      *
  33.      * @ORM\ManyToOne(targetEntity="App\Entity\Member", cascade={"persist"})
  34.      *
  35.      * @ORM\JoinColumn(name="target_id", referencedColumnName="id", onDelete="CASCADE", nullable=false)
  36.      */
  37.     private ?Member $target null;
  38.     /**
  39.      * @Groups({"operatorindex", "memberfrontendindex"})
  40.      *
  41.      * @ORM\Column(name="isOnline", type="boolean", options={"default"=0})
  42.      */
  43.     private bool $isOnline false;
  44.     /**
  45.      * @Groups({"operatorindex"})
  46.      *
  47.      * @var float|int
  48.      */
  49.     protected float $openProfit 0;
  50.     /**
  51.      * @Groups({"operatorindex"})
  52.      *
  53.      * @var float|int
  54.      */
  55.     protected float $monthlyBalance 0;
  56.     public function getId()
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getOperator(): ?Member
  61.     {
  62.         return $this->operator;
  63.     }
  64.     public function setOperator(?Member $operator): self
  65.     {
  66.         $this->operator $operator;
  67.         return $this;
  68.     }
  69.     public function getTarget(): ?Member
  70.     {
  71.         return $this->target;
  72.     }
  73.     public function setTarget(?Member $target): self
  74.     {
  75.         $this->target $target;
  76.         return $this;
  77.     }
  78.     public function getIsOnline(): ?bool
  79.     {
  80.         return $this->isOnline;
  81.     }
  82.     public function setIsOnline(bool $isOnline): self
  83.     {
  84.         $this->isOnline $isOnline;
  85.         return $this;
  86.     }
  87.     /**
  88.      * @return $this
  89.      */
  90.     public function setOpenProfit(float $openProfit): self
  91.     {
  92.         $this->openProfit $openProfit;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return $this
  97.      */
  98.     public function setMonthlyBalance(float $balance): self
  99.     {
  100.         $this->monthlyBalance $balance;
  101.         return $this;
  102.     }
  103. }