<?phpnamespace App\Entity;use App\Repository\DeviceRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;use Symfony\Component\Validator\Constraints as Assert;/** * @ORM\Entity(repositoryClass=DeviceRepository::class) */class Device extends EntityBase{ /** * @Groups("api") * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @Groups("api") * @ORM\Column(type="string", length=255) * @Assert\NotBlank(groups="creationAppareil") */ private $uuid; /** * @Groups("api") * @ORM\Column(type="string", length=255, nullable=true) * @Assert\NotBlank(groups="creationAppareil") */ private $model; /** * @Groups("api") * @ORM\Column(type="string", length=255, nullable=true) * @Assert\NotBlank(groups="creationAppareil") */ private $platform; /** * @Groups("api") * @ORM\ManyToOne(targetEntity=Poste::class, inversedBy="devices") * @Assert\NotBlank(groups="creationAppareil") * @ORM\JoinColumn(nullable=true) */ private $poste; public function getId(): ?int { return $this->id; } public function getUuid(): ?string { return $this->uuid; } public function setUuid(string $uuid): self { $this->uuid = $uuid; return $this; } public function getModel(): ?string { return $this->model; } public function setModel(?string $model): self { $this->model = $model; return $this; } public function getPlatform(): ?string { return $this->platform; } public function setPlatform(?string $platform): self { $this->platform = $platform; return $this; } public function getPoste(): ?Poste { return $this->poste; } public function setPoste(?Poste $poste): self { $this->poste = $poste; return $this; }}