<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\TypeUserRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: TypeUserRepository::class)]
#[ApiResource(
collectionOperations:[
'get'
],
itemOperations: [
'get'
],
)]
class TypeUser
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
#[Groups(['user:read'])]
private $id;
#[ORM\Column(type: 'string', length: 45)]
#[Groups(['user:read'])]
private $label;
#[ORM\Column(type: 'integer', nullable: true)]
private $code;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): self
{
$this->label = $label;
return $this;
}
public function getCode(): ?int
{
return $this->code;
}
public function setCode(?int $code): self
{
$this->code = $code;
return $this;
}
}