<?php | |
// src/Domain/User/Entity/User.php | |
namespace App\Domain\User\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use App\Domain\User\Repository\UserRepository; | |
use Symfony\Component\Validator\Constraints as Assert; | |
/** | |
* Class User | |
* | |
* @package App\Domain\User\Entity | |
* @author DEVŌT <devot.team> | |
*/ | |
#[ORM\Table(name: "user")] | |
#[ORM\Entity(repositoryClass: UserRepository::class)] | |
class User | |
{ | |
/** | |
* @var int | |
*/ | |
#[Assert\NotBlank] | |
#[ORM\Column(name: "id", type: "integer")] | |
private int $id; | |
/** | |
* @return int | |
*/ | |
public function getId(): int | |
{ | |
return $this->id; | |
} | |
/** | |
* @param int $id | |
* @return User | |
*/ | |
public function setId(int $id): User | |
{ | |
$this->id = $id; | |
return $this; | |
} | |
} |