<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
/**
* @ORM\Entity(repositoryClass=UserRepository::class)
*/
class User implements UserInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=180, unique=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=2500, unique=true)
*/
private $password;
/**
* @var string|null
*
* @ORM\Column(name="name", type="text", length=65535, nullable=true)
*/
private $name;
/**
* @var string|null
*
* @ORM\Column(name="slack", type="text", length=65535, nullable=true)
*/
private $slack;
/**
* @var string|null
*
* @ORM\Column(name="notes", type="text", length=65535, nullable=true)
*/
private $notes;
/**
* @var string|null
*
* @ORM\Column(name="language", type="text", length=65535, nullable=true)
*/
private $language;
/**
* @var string|null
*
* @ORM\Column(name="lastname", type="text", length=65535, nullable=true)
*/
private $lastname;
/**
* @var int|null
*
* @ORM\Column(name="customer_id", type="text", length=65535, nullable=true)
*/
private $customerId;
/**
* @var int|null
*
* @ORM\Column(name="id_jira", type="text", nullable=true)
*/
private $idJira;
/**
* @var int|null
*
* @ORM\Column(name="notification_active", type="integer", nullable=false, options={"default" : 1})
*/
private $notificationActive;
/**
* @var string|null
*
* @ORM\Column(name="errorJira", type="text", length=65535, nullable=true)
*/
private $errorJira;
/**
* @var string|null
*
* @ORM\Column(name="podcastHost", type="text", length=65535, nullable=true)
*/
private $podcastHost;
/**
* @ORM\Column(type="json")
*/
private $roles = [];
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getSlack(): ?string
{
return $this->slack;
}
public function setSlack(?string $slack): self
{
$this->slack = $slack;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
public function getLanguage(): ?string
{
return $this->language;
}
public function setLanguage(?string $language): self
{
$this->language = $language;
return $this;
}
public function getLastname(): ?string
{
return $this->lastname;
}
public function setLastname(?string $lastname): self
{
$this->lastname = $lastname;
return $this;
}
public function getCustomerId(): ?string
{
return $this->customerId;
}
public function setCustomerId(?string $customerId): self
{
$this->customerId = $customerId;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUserIdentifier(): string
{
return (string) $this->email;
}
/**
* @deprecated since Symfony 5.3, use getUserIdentifier instead
*/
public function getUsername(): string
{
return (string) $this->email;
}
public function getIdJira(): ?string
{
return $this->idJira;
}
public function setIdJira(?string $idJira): self
{
$this->idJira = $idJira;
return $this;
}
public function getNotificationActive(): ?int
{
return $this->notificationActive;
}
public function setNotificationActive(?int $notificationActive): self
{
$this->notificationActive = $notificationActive;
return $this;
}
public function getErrorJira(): ?string
{
return $this->errorJira;
}
public function setErrorJira(?string $errorJira): self
{
$this->errorJira = $errorJira;
return $this;
}
public function getPodcastHost(): ?string
{
return $this->podcastHost;
}
public function setPodcastHost(?string $podcastHost): self
{
$this->podcastHost = $podcastHost;
return $this;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
public function setRoles(array $roles): self
{
$this->roles = $roles;
return $this;
}
/**
* This method can be removed in Symfony 6.0 - is not needed for apps that do not check user passwords.
*
* @see UserInterface
*/
public function getSalt(): ?string
{
return null;
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
}