Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Entity;
- use ApiPlatform\Core\Annotation\ApiResource;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ApiResource()
- * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
- */
- class User
- {
- /**
- * @ORM\Id()
- * @ORM\GeneratedValue()
- * @ORM\Column(type="integer")
- */
- private $id;
- /**
- * @ORM\Column(type="string", length=100)
- */
- private $username;
- /**
- * @ORM\Column(type="string", length=100)
- */
- private $password;
- /**
- * @ORM\Column(type="string", length=255)
- */
- private $email;
- /**
- * @ORM\Column(type="boolean")
- */
- private $isActive;
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getUsername(): ?string
- {
- return $this->username;
- }
- public function setUsername(string $username): self
- {
- $this->username = $username;
- return $this;
- }
- public function getPassword(): ?string
- {
- return $this->password;
- }
- public function setPassword(string $password): self
- {
- $this->password = $password;
- return $this;
- }
- public function getEmail(): ?string
- {
- return $this->email;
- }
- public function setEmail(string $email): self
- {
- $this->email = $email;
- return $this;
- }
- public function getIsActive(): ?bool
- {
- return $this->isActive;
- }
- public function setIsActive(bool $isActive): self
- {
- $this->isActive = $isActive;
- return $this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment