src/Infrastructure/Doctrine/Entity/DoctrineMachine.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Infrastructure\Doctrine\Entity;
  4. use App\Domain\Common\Entity\Centre;
  5. use App\Domain\Common\Entity\Machine;
  6. use App\Infrastructure\Doctrine\Entity\Traits\IdableTrait;
  7. use App\Infrastructure\Doctrine\Entity\Traits\LibellableTrait;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use Gedmo\Mapping\Annotation as Gedmo;
  12. /**
  13.  * @ORM\Entity(repositoryClass="App\Infrastructure\Doctrine\Repository\DoctrineMachineRepository")
  14.  * @ORM\Table(name="machine")
  15.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=false)
  16.  */
  17. class DoctrineMachine implements Machine
  18. {
  19.     use IdableTrait;
  20.     use SoftDeleteableEntity;
  21.     use LibellableTrait;
  22.     /**
  23.      * @ORM\Column(name="id", type="integer")
  24.      * @ORM\Id
  25.      */
  26.     protected ?int $id null;
  27.     /**
  28.      * @ORM\Column(type="string", length=100)
  29.      * @Assert\NotBlank()
  30.      */
  31.     protected string $path '';
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="DoctrineCentre")
  34.      * @ORM\JoinColumn(name="centre_id", referencedColumnName="id")
  35.      * @Assert\NotNull()
  36.      */
  37.     protected ?Centre $centre null;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     protected ?string $pathToWatch;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     protected ?string $pathToCopy;
  46.     public function getPath(): string
  47.     {
  48.         return $this->path;
  49.     }
  50.     public function setPath(string $path): void
  51.     {
  52.         $this->path $path;
  53.     }
  54.     public function getCentre(): ?Centre
  55.     {
  56.         return $this->centre;
  57.     }
  58.     public function setCentre(?Centre $centre): void
  59.     {
  60.         $this->centre $centre;
  61.     }
  62.     public function getPathToWatch(): ?string
  63.     {
  64.         return $this->pathToWatch;
  65.     }
  66.     public function setPathToWatch(?string $pathToWatch): void
  67.     {
  68.         $this->pathToWatch $pathToWatch;
  69.     }
  70.     public function getPathToCopy(): ?string
  71.     {
  72.         return $this->pathToCopy;
  73.     }
  74.     public function setPathToCopy(?string $pathToCopy): void
  75.     {
  76.         $this->pathToCopy $pathToCopy;
  77.     }
  78. }