Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints as Assert;
- use Symfony\Component\Security\Core\User\UserInterface;
- /**
- * @ORM\Entity(repositoryClass="App\Repository\WebuserRepository")
- */
- class Webuser implements UserInterface
- {
- /**
- * @ORM\Id
- * @ORM\Column(name="id",type="integer")
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @ORM\Column(name="firstname",type="string",length=50)
- * @Assert\NotBlank()
- */
- private $firstname;
- /**
- * @ORM\Column(name="lastname",type="string",length=50)
- * @Assert\NotBlank()
- */
- private $lastname;
- /**
- * @ORM\Column(name="username",type="string",length=50, unique=true)
- * @Assert\NotBlank()
- */
- private $username;
- /**
- * @ORM\Column(name="email",type="string",length=50, unique=true)
- * @Assert\NotBlank()
- */
- private $email;
- /**
- * @Assert\Length(max=128)
- */
- private $inputPassword;
- /**
- * @ORM\Column(name="password",type="string",length=50)
- */
- private $password;
- /**
- * @ORM\Column(name="dtregistration",type="datetime")
- */
- private $dtregistration;
- /**
- * @ORM\Column(name="role",type="string",length=30 )
- */
- private $role;
- //CONSTRUCTOR
- public function __construct()
- {
- $this->dtregistration = new \DateTime();
- $this->role = "visiteur";
- }
- //GET AND SET METHODS
- /**
- * @return mixed
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * @param mixed $id
- */
- public function setId($id): void
- {
- $this->id = $id;
- }
- /**
- * @return mixed
- */
- public function getFirstname()
- {
- return $this->firstname;
- }
- /**
- * @param mixed $firstname
- */
- public function setFirstname($firstname): void
- {
- $this->firstname = $firstname;
- }
- /**
- * @return mixed
- */
- public function getLastname()
- {
- return $this->lastname;
- }
- /**
- * @param mixed $lastname
- */
- public function setLastname($lastname): void
- {
- $this->lastname = $lastname;
- }
- /**
- * @return mixed
- */
- public function getUsername()
- {
- return $this->username;
- }
- /**
- * @param mixed $username
- */
- public function setUsername($username): void
- {
- $this->username = $username;
- }
- /**
- * @return mixed
- */
- public function getEmail()
- {
- return $this->email;
- }
- /**
- * @param mixed $email
- */
- public function setEmail($email): void
- {
- $this->email = $email;
- }
- /**
- * @return mixed
- */
- public function getInputPassword()
- {
- return $this->inputPassword;
- }
- /**
- * @param mixed $inputPassword
- */
- public function setInputPassword($inputPassword)
- {
- $this->inputPassword = $inputPassword;
- }
- /**
- * @return mixed
- */
- public function getPassword()
- {
- return $this->password;
- }
- /**
- * @param mixed $password
- */
- public function setPassword($password): void
- {
- $this->password = $password;
- }
- /**
- * @return mixed
- */
- public function getDtregistration()
- {
- return $this->dtregistration;
- }
- /**
- * @param mixed $dtregistration
- */
- public function setDtregistration($dtregistration): void
- {
- $this->dtregistration = $dtregistration;
- }
- /**
- * @return mixed
- */
- public function getRole()
- {
- return $this->role;
- }
- /**
- * @param mixed $role
- */
- public function setRole($role): void
- {
- $this->role = $role;
- }
- public function getSalt()
- {
- // TODO: Implement getSalt() method.
- }
- public function eraseCredentials()
- {
- // TODO: Implement eraseCredentials() method.
- }
- public function getRoles()
- {
- // TODO: Implement getRoles() method.
- }
- }
Add Comment
Please, Sign In to add comment