src/Entity/Device.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DeviceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Entity(repositoryClass=DeviceRepository::class)
  9.  */
  10. class Device extends EntityBase
  11. {
  12.     /**
  13.      * @Groups("api")
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @Groups("api")
  21.      * @ORM\Column(type="string", length=255)
  22.      * @Assert\NotBlank(groups="creationAppareil")
  23.      */
  24.     private $uuid;
  25.     /**
  26.      * @Groups("api")
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      * @Assert\NotBlank(groups="creationAppareil")
  29.      */
  30.     private $model;
  31.     /**
  32.      * @Groups("api")
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      * @Assert\NotBlank(groups="creationAppareil")
  35.      */
  36.     private $platform;
  37.     /**
  38.      * @Groups("api")
  39.      * @ORM\ManyToOne(targetEntity=Poste::class, inversedBy="devices")
  40.      * @Assert\NotBlank(groups="creationAppareil")
  41.      * @ORM\JoinColumn(nullable=true)
  42.      */
  43.     private $poste;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getUuid(): ?string
  49.     {
  50.         return $this->uuid;
  51.     }
  52.     public function setUuid(string $uuid): self
  53.     {
  54.         $this->uuid $uuid;
  55.         return $this;
  56.     }
  57.     public function getModel(): ?string
  58.     {
  59.         return $this->model;
  60.     }
  61.     public function setModel(?string $model): self
  62.     {
  63.         $this->model $model;
  64.         return $this;
  65.     }
  66.     public function getPlatform(): ?string
  67.     {
  68.         return $this->platform;
  69.     }
  70.     public function setPlatform(?string $platform): self
  71.     {
  72.         $this->platform $platform;
  73.         return $this;
  74.     }
  75.     public function getPoste(): ?Poste
  76.     {
  77.         return $this->poste;
  78.     }
  79.     public function setPoste(?Poste $poste): self
  80.     {
  81.         $this->poste $poste;
  82.         return $this;
  83.     }
  84. }