Skip to content

Instantly share code, notes, and snippets.

@programarivm
Last active May 11, 2023 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programarivm/0e65389147fa485c09085c5d8b3a5e4a to your computer and use it in GitHub Desktop.
Save programarivm/0e65389147fa485c09085c5d8b3a5e4a to your computer and use it in GitHub Desktop.
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
*/
class User
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $username;
public function getId(): ?int
{
return $this->id;
}
public function getUsername(): ?string
{
return $this->username;
}
public function setUsername(string $username): self
{
$this->username = $username;
return $this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment