refs #723. Added new entity Trace
parent
794237dd90
commit
b4f9f1e9bb
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\TraceRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: TraceRepository::class)]
|
||||
class Trace extends AbstractEntity
|
||||
{
|
||||
#[ORM\ManyToOne(inversedBy: 'traces')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Client $client = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'traces')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Command $command = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $status = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $output = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||
private ?\DateTimeImmutable $executedAt = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||
private ?\DateTimeImmutable $finishedAt = null;
|
||||
|
||||
public function getClient(): ?Client
|
||||
{
|
||||
return $this->client;
|
||||
}
|
||||
|
||||
public function setClient(?Client $client): static
|
||||
{
|
||||
$this->client = $client;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCommand(): ?Command
|
||||
{
|
||||
return $this->command;
|
||||
}
|
||||
|
||||
public function setCommand(?Command $command): static
|
||||
{
|
||||
$this->command = $command;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getStatus(): ?string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
public function setStatus(string $status): static
|
||||
{
|
||||
$this->status = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getOutput(): ?string
|
||||
{
|
||||
return $this->output;
|
||||
}
|
||||
|
||||
public function setOutput(?string $output): static
|
||||
{
|
||||
$this->output = $output;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getExecutedAt(): ?\DateTimeImmutable
|
||||
{
|
||||
return $this->executedAt;
|
||||
}
|
||||
|
||||
public function setExecutedAt(\DateTimeImmutable $executedAt): static
|
||||
{
|
||||
$this->executedAt = $executedAt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFinishedAt(): ?\DateTimeImmutable
|
||||
{
|
||||
return $this->finishedAt;
|
||||
}
|
||||
|
||||
public function setFinishedAt(\DateTimeImmutable $finishedAt): static
|
||||
{
|
||||
$this->finishedAt = $finishedAt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Trace;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Trace>
|
||||
*/
|
||||
class TraceRepository extends AbstractRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Trace::class);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue