<?php
declare(strict_types=1);
namespace App\Infrastructure\Doctrine\Entity;
use App\Domain\Common\Entity\Centre;
use App\Domain\Common\Entity\Machine;
use App\Infrastructure\Doctrine\Entity\Traits\IdableTrait;
use App\Infrastructure\Doctrine\Entity\Traits\LibellableTrait;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Infrastructure\Doctrine\Repository\DoctrineMachineRepository")
* @ORM\Table(name="machine")
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=false)
*/
class DoctrineMachine implements Machine
{
use IdableTrait;
use SoftDeleteableEntity;
use LibellableTrait;
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
*/
protected ?int $id = null;
/**
* @ORM\Column(type="string", length=100)
* @Assert\NotBlank()
*/
protected string $path = '';
/**
* @ORM\ManyToOne(targetEntity="DoctrineCentre")
* @ORM\JoinColumn(name="centre_id", referencedColumnName="id")
* @Assert\NotNull()
*/
protected ?Centre $centre = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected ?string $pathToWatch;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected ?string $pathToCopy;
public function getPath(): string
{
return $this->path;
}
public function setPath(string $path): void
{
$this->path = $path;
}
public function getCentre(): ?Centre
{
return $this->centre;
}
public function setCentre(?Centre $centre): void
{
$this->centre = $centre;
}
public function getPathToWatch(): ?string
{
return $this->pathToWatch;
}
public function setPathToWatch(?string $pathToWatch): void
{
$this->pathToWatch = $pathToWatch;
}
public function getPathToCopy(): ?string
{
return $this->pathToCopy;
}
public function setPathToCopy(?string $pathToCopy): void
{
$this->pathToCopy = $pathToCopy;
}
}