src\Entity\SystemUser.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SystemUserRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation as Serializer;
  6. /**
  7.  * @ORM\Entity(repositoryClass=SystemUserRepository::class)
  8.  * @ORM\Table(name = "neema.`system_user`")
  9.  */
  10. class SystemUser
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @Serializer\Type("string")
  20.      * @ORM\Column(type="string", length=100)
  21.      */
  22.     private $staffName;
  23.     /**
  24.      * @Serializer\Type("string")
  25.      * @ORM\Column(type="string", length=100)
  26.      */
  27.     private $staffCode;
  28.     /**
  29.      * @ORM\Column(type="string", length=10)
  30.      */
  31.     private $phone;
  32.     /**
  33.      * @ORM\Column(type="string", length=10)
  34.      */
  35.     private $branchCode;
  36.     /**
  37.      * @ORM\Column(type="string", length=10)
  38.      */
  39.     private $idNumber;
  40.     /**
  41.      * @ORM\Column(type="datetime")
  42.      */
  43.     private $createdAt;
  44.     /**
  45.      * @ORM\Column(type="string", length=20, nullable=true)
  46.      */
  47.     private $signUpCode;
  48.     private $roles;
  49.     // @var Branch $branch*/
  50.     //private Branch $branch;
  51. //    public function __construct(){
  52. //        if(!$this->branch)
  53. //            $this->branch = new Branch();
  54. //    }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     /**
  60.      * @return mixed
  61.      */
  62.     public function getStaffName()
  63.     {
  64.         return $this->staffName;
  65.     }
  66.     /**
  67.      * @param mixed $staffName
  68.      */
  69.     public function setStaffName($staffName): void
  70.     {
  71.         $this->staffName $staffName;
  72.     }
  73.     /**
  74.      * @return mixed
  75.      */
  76.     public function getStaffCode()
  77.     {
  78.         return $this->staffCode;
  79.     }
  80.     /**
  81.      * @param mixed $staffCode
  82.      */
  83.     public function setStaffCode($staffCode): void
  84.     {
  85.         $this->staffCode $staffCode;
  86.     }
  87.     /**
  88.      * @return mixed
  89.      */
  90.     public function getPhone()
  91.     {
  92.         return $this->phone;
  93.     }
  94.     /**
  95.      * @param mixed $phone
  96.      */
  97.     public function setPhone($phone): void
  98.     {
  99.         $this->phone $phone;
  100.     }
  101.     /**
  102.      * @return mixed
  103.      */
  104.     public function getBranchCode()
  105.     {
  106.         return $this->branchCode;
  107.     }
  108.     /**
  109.      * @param mixed $branchCode
  110.      */
  111.     public function setBranchCode($branchCode): void
  112.     {
  113.         $this->branchCode $branchCode;
  114.     }
  115.     /**
  116.      * @return mixed
  117.      */
  118.     public function getIdNumber()
  119.     {
  120.         return $this->idNumber;
  121.     }
  122.     /**
  123.      * @param mixed $idNumber
  124.      */
  125.     public function setIdNumber($idNumber): void
  126.     {
  127.         $this->idNumber $idNumber;
  128.     }
  129.     /**
  130.      * @return mixed
  131.      */
  132.     public function getCreatedAt()
  133.     {
  134.         return $this->createdAt;
  135.     }
  136.     /**
  137.      * @param mixed $createdAt
  138.      */
  139.     public function setCreatedAt($createdAt): void
  140.     {
  141.         $this->createdAt $createdAt;
  142.     }
  143.     public function getSignUpCode(): ?string
  144.     {
  145.         return $this->signUpCode;
  146.     }
  147.     public function setSignUpCode(?string $signUpCode): self
  148.     {
  149.         $this->signUpCode $signUpCode;
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return mixed
  154.      */
  155.     public function getRoles()
  156.     {
  157.         return $this->roles;
  158.     }
  159.     /**
  160.      * @param mixed $roles
  161.      */
  162.     public function setRoles($roles): void
  163.     {
  164.         $this->roles $roles;
  165.     }
  166.     public function __toString()
  167.     {
  168.         // TODO: Implement __toString() method.
  169.         return $this->getStaffName() ?  $this->staffName "" ;
  170.     }
  171. //    /**
  172. //     * @return Branch
  173. //     */
  174. //    public function getBranch(): Branch
  175. //    {
  176. //        return $this->branch;
  177. //    }
  178. //
  179. //    /**
  180. //     * @param Branch $branch
  181. //     */
  182. //    public function setBranch(Branch $branch): void
  183. //    {
  184. //        $this->branch = $branch;
  185. //    }
  186. }