src/Admin/SuperAdmin/Modules/Trader/Entity/UserTrader.php line 12

  1. <?php
  2. namespace App\Admin\SuperAdmin\Modules\Trader\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Modules\User\Entity\User;
  5. /**
  6.  * @ORM\Table(name="user_trader", uniqueConstraints={@ORM\UniqueConstraint(name="id_user", columns={"id_user"}),  @ORM\UniqueConstraint(columns={"referral_id"})}, indexes={@ORM\Index(columns={"first_name"}), @ORM\Index(columns={"last_name"})})
  7.  * @ORM\Entity
  8.  */
  9. class UserTrader
  10. {
  11.     /**
  12.      * @ORM\Column(type="integer")
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue(strategy="AUTO")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @var \App\Modules\User\Entity\User
  19.      *
  20.      * @ORM\ManyToOne(targetEntity="App\Modules\User\Entity\User", inversedBy="trader")
  21.      * @ORM\JoinColumns({
  22.      *   @ORM\JoinColumn(name="id_user", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  23.      * })
  24.      */
  25.     private $user;
  26.     
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="first_name", type="string", length=255, nullable=false, options={"collation"="utf8_unicode_ci"})
  31.      */
  32.     private $firstName;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="last_name", type="string", length=255, nullable=false, options={"collation"="utf8_unicode_ci"})
  37.      */
  38.     private $lastName;
  39.     /**
  40.      * @var string
  41.      *
  42.      * @ORM\Column(name="note", type="string", length=1024, nullable=true)
  43.      */
  44.     private $note;
  45.     
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="referral_id", type="string", length=255, nullable=true)
  50.      */
  51.     private $referralId;    
  52.     /**
  53.      * @var int
  54.      *
  55.      * @ORM\Column(name="reflink_view_count", type="integer", nullable=false)
  56.      */
  57.     private $reflinkViewCount;
  58.     public function __construct()
  59.     {
  60.         $this->reflinkViewCount 0;
  61.     }
  62.     
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getFirstName(): ?string
  68.     {
  69.         return $this->firstName;
  70.     }
  71.     public function setFirstName(string $firstName): self
  72.     {
  73.         $this->firstName $firstName;
  74.         return $this;
  75.     }
  76.     public function getLastName(): ?string
  77.     {
  78.         return $this->lastName;
  79.     }
  80.     public function setLastName(string $lastName): self
  81.     {
  82.         $this->lastName $lastName;
  83.         return $this;
  84.     }
  85.     public function getUser(): ?User
  86.     {
  87.         return $this->user;
  88.     }
  89.     public function setUser(?User $user): self
  90.     {
  91.         $this->user $user;
  92.         return $this;
  93.     }
  94.     public function getReflinkViewCount(): ?int
  95.     {
  96.         return $this->reflinkViewCount;
  97.     }
  98.     public function setReflinkViewCount(int $reflinkViewCount): self
  99.     {
  100.         $this->reflinkViewCount $reflinkViewCount;
  101.         return $this;
  102.     }
  103.     public function getNote(): ?string
  104.     {
  105.         return $this->note;
  106.     }
  107.     public function setNote(?string $note): self
  108.     {
  109.         $this->note $note;
  110.         return $this;
  111.     }
  112.     public function getReferralId(): ?string
  113.     {
  114.         return $this->referralId;
  115.     }
  116.     public function setReferralId(?string $referralId): self
  117.     {
  118.         $this->referralId $referralId;
  119.         return $this;
  120.     }
  121. }