yoesoff

User Entitiy

Aug 7th, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.63 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Entity;
  4.  
  5. use ApiPlatform\Core\Annotation\ApiResource;
  6. use Doctrine\ORM\Mapping as ORM;
  7.  
  8. /**
  9.  * @ApiResource()
  10.  * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
  11.  */
  12. class User
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      * @ORM\GeneratedValue()
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.  
  21.     /**
  22.      * @ORM\Column(type="string", length=100)
  23.      */
  24.     private $username;
  25.  
  26.     /**
  27.      * @ORM\Column(type="string", length=100)
  28.      */
  29.     private $password;
  30.  
  31.     /**
  32.      * @ORM\Column(type="string", length=255)
  33.      */
  34.     private $email;
  35.  
  36.     /**
  37.      * @ORM\Column(type="boolean")
  38.      */
  39.     private $isActive;
  40.  
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.  
  46.     public function getUsername(): ?string
  47.     {
  48.         return $this->username;
  49.     }
  50.  
  51.     public function setUsername(string $username): self
  52.     {
  53.         $this->username = $username;
  54.  
  55.         return $this;
  56.     }
  57.  
  58.     public function getPassword(): ?string
  59.     {
  60.         return $this->password;
  61.     }
  62.  
  63.     public function setPassword(string $password): self
  64.     {
  65.         $this->password = $password;
  66.  
  67.         return $this;
  68.     }
  69.  
  70.     public function getEmail(): ?string
  71.     {
  72.         return $this->email;
  73.     }
  74.  
  75.     public function setEmail(string $email): self
  76.     {
  77.         $this->email = $email;
  78.  
  79.         return $this;
  80.     }
  81.  
  82.     public function getIsActive(): ?bool
  83.     {
  84.         return $this->isActive;
  85.     }
  86.  
  87.     public function setIsActive(bool $isActive): self
  88.     {
  89.         $this->isActive = $isActive;
  90.  
  91.         return $this;
  92.     }
  93. }
Advertisement
Add Comment
Please, Sign In to add comment