<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
/**
* @ORM\Entity(repositoryClass=AdminRepository::class)
*/
class User implements UserInterface
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $username;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $password;
public function __construct()
{
$this->helps = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return string|null
*/
public function getUsername(): ?string
{
return $this->username;
}
/**
* @param string|null $username
* @return $this
*/
public function setUsername(?string $username): self
{
$this->username = $username;
return $this;
}
/**
* @return string|null
*/
public function getEmail(): ?string
{
return $this->email;
}
/**
* @param string|null $email
* @return $this
*/
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
/**
* @return string|null
*/
public function getPassword(): ?string
{
return $this->password;
}
/**
* @param string|null $password
* @return $this
*/
public function setPassword(?string $password): self
{
$this->password = $password;
return $this;
}
/**
* @return bool
*/
public function isEnabled(): bool
{
return $this->enabled;
}
/**
* @param bool $enabled
* @return User
*/
public function setEnabled(bool $enabled): User
{
$this->enabled = $enabled;
return $this;
}
/**
* @return string
*/
public function getRole(): ?string
{
return $this->role;
}
/**
* {@inheritdoc}
*/
public function getRoles(): array
{
return [$this->role];
}
/**
* @param string $role
*/
public function setRole(string $role): void
{
$this->role = $role;
}
/**
* @return bool
*/
public function isHasValidatedCGU(): bool
{
return $this->hasValidatedCGU;
}
/**
* @param bool $hasValidatedCGU
*/
public function setHasValidatedCGU(bool $hasValidatedCGU): void
{
$this->hasValidatedCGU = $hasValidatedCGU;
}
/**
* @return string
*/
public function getReference(): string
{
return $this->reference;
}
/**
* @param string $reference
*/
public function setReference(string $reference): void
{
$this->reference = $reference;
}
/**
* @param \DateTime|null $passwordResetDate
*/
public function setPasswordResetDate(?\DateTime $passwordResetDate): void
{
$this->passwordResetDate = $passwordResetDate;
}
/**
* @return \DateTime|null
*/
public function getPasswordResetDate(): ?\DateTime
{
return $this->passwordResetDate;
}
/**
* @param string $passwordReset
*/
public function setPasswordReset($passwordReset): void
{
$this->passwordReset = $passwordReset;
}
/**
* @return string|null
*/
public function getPasswordReset(): ?string
{
return $this->passwordReset;
}
/**
* @param \DateTime|null $updated
*/
public function setUpdated(?\DateTime $updated): void
{
$this->updated = $updated;
}
/**
* @return \DateTime|null
*/
public function getUpdated(): ?\DateTime
{
return $this->updated;
}
/**
* @param \DateTime|null $creadted
*/
public function setCreated(?\DateTime $creadted): void
{
$this->created = $creadted;
}
/**
* @return \DateTime|null
*/
public function getCreated(): ?\DateTime
{
return $this->created;
}
/**
* @return \DateTime|null
*/
public function getDeleted(): ?\DateTime
{
return $this->deleted;
}
/**
* @param \DateTime $deleted
*/
public function setDeleted(\DateTime $deleted): void
{
$this->deleted = $deleted;
}
/**
* @return string|null
*/
public function getSalt()
{
return null;
}
/**
* Loads the user for the given username.
*
* @param string $username The username
*
* @return UserInterface
*
* @throws UsernameNotFoundException if the user is not found
*/
public function loadUserByUsername($username)
{
// TODO: Implement loadUserByUsername() method.
}
/**
* Refreshes the user for the account interface.
*
* @param UserInterface $user
*
* @return UserInterface
*
* @throws UnsupportedUserException if the account is not supported
*/
public function refreshUser(UserInterface $user)
{
// TODO: Implement refreshUser() method.
}
public function eraseCredentials()
{
}
}