Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: mario-radu
- * Date: 2/4/19
- * Time: 3:32 PM
- */
- declare(strict_types=1);
- namespace App\Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity
- * @ORM\Table(name="users")
- */
- class AppEntity implements \JsonSerializable
- {
- /**
- * @ORM\Id
- * @ORM\Column(type="integer", name="id", nullable=false)
- * @ORM\GeneratedValue(strategy="IDENTITY")
- */
- protected $id;
- /**
- * @ORM\Column(type="string",nullable=false)
- */
- protected $name;
- /**
- * @ORM\Column(type="string",nullable=false)
- */
- protected $email;
- /**
- * @ORM\Column(type="string",nullable=false)
- */
- protected $password;
- /**
- * @return mixed
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * @param mixed $id
- */
- public function setId($id)
- {
- $this->id = $id;
- }
- /**
- * @return mixed
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * @param mixed $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * @return mixed
- */
- public function getEmail()
- {
- return $this->email;
- }
- /**
- * @param mixed $email
- */
- public function setEmail($email)
- {
- $this->email = $email;
- }
- /**
- * @return mixed
- */
- public function getPassword()
- {
- return $this->password;
- }
- /**
- * @param mixed $password
- */
- public function setPassword($password)
- {
- $this->password = $password;
- }
- public function jsonSerialize()
- {
- return [
- 'id' => $this->getId(),
- 'name' => $this->getName(),
- 'email' => $this->getEmail(),
- 'password' => $this->getPassword(),
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement