Skip to content

Instantly share code, notes, and snippets.

@yusufbiberoglu
Last active August 28, 2020 01:15
Show Gist options
  • Save yusufbiberoglu/771b7bb6fd5915af8d89c343355ef3ee to your computer and use it in GitHub Desktop.
Save yusufbiberoglu/771b7bb6fd5915af8d89c343355ef3ee to your computer and use it in GitHub Desktop.
<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @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="json")
*/
private $roles = [];
/**
* @var string The hashed password
* @ORM\Column(type="string")
*/
private $password;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $birthday;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fullName;
public function getId(): ?int
{
return $this->id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment