feat: ajout de la gestion des jobs avec création, récupération et filtrage via l'API, incluant des entités et des mappers pour les échecs et les jobs
This commit is contained in:
parent
d7088b14c2
commit
d7ccc1e603
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Shared\Infrastructure\Persistence\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'failed_job')]
|
||||
class FailedJobEntity
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\Column]
|
||||
private string $id;
|
||||
|
||||
#[ORM\Column(type: 'string')]
|
||||
private string $type;
|
||||
|
||||
#[ORM\Column(type: 'text')]
|
||||
private string $failureReason;
|
||||
|
||||
#[ORM\Column]
|
||||
private \DateTimeImmutable $failedAt;
|
||||
|
||||
#[ORM\Column(type: 'json')]
|
||||
private array $context = [];
|
||||
|
||||
public function getId(): string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(string $id): self
|
||||
{
|
||||
$this->id = $id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getType(): string
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function setType(string $type): self
|
||||
{
|
||||
$this->type = $type;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFailureReason(): string
|
||||
{
|
||||
return $this->failureReason;
|
||||
}
|
||||
|
||||
public function setFailureReason(string $failureReason): self
|
||||
{
|
||||
$this->failureReason = $failureReason;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFailedAt(): \DateTimeImmutable
|
||||
{
|
||||
return $this->failedAt;
|
||||
}
|
||||
|
||||
public function setFailedAt(\DateTimeImmutable $failedAt): self
|
||||
{
|
||||
$this->failedAt = $failedAt;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getContext(): array
|
||||
{
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
public function setContext(array $context): self
|
||||
{
|
||||
$this->context = $context;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user