src/Entity/CRM/AudioEditJob.php line 10

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\CRM\AudioEditJobRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAudioEditJobRepository::class)]
  7. class AudioEditJob
  8. {
  9.     public const TYPE_TRIM 'trim';
  10.     public const TYPE_CUT 'cut';
  11.     public const TYPE_EXPORT 'export';
  12.     public const TYPE_CONVERT 'convert';
  13.     public const STATUS_PENDING 'pending';
  14.     public const STATUS_PROCESSING 'processing';
  15.     public const STATUS_COMPLETED 'completed';
  16.     public const STATUS_FAILED 'failed';
  17.     #[ORM\Id]
  18.     #[ORM\GeneratedValue]
  19.     #[ORM\Column]
  20.     private ?int $id null;
  21.     #[ORM\ManyToOne(inversedBy'jobs')]
  22.     #[ORM\JoinColumn(nullablefalse)]
  23.     private ?AudioAsset $audioAsset null;
  24.     #[ORM\Column(length20)]
  25.     private string $type;
  26.     #[ORM\Column(typeTypes::JSON)]
  27.     private array $parameters = [];
  28.     #[ORM\Column(length20)]
  29.     private string $status self::STATUS_PENDING;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $outputPath null;
  32.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  33.     private ?string $log null;
  34.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  35.     private \DateTimeInterface $createdAt;
  36.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  37.     private ?\DateTimeInterface $startedAt null;
  38.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  39.     private ?\DateTimeInterface $finishedAt null;
  40.     public function __construct()
  41.     {
  42.         $this->createdAt = new \DateTime();
  43.     }
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getAudioAsset(): ?AudioAsset
  49.     {
  50.         return $this->audioAsset;
  51.     }
  52.     public function setAudioAsset(?AudioAsset $audioAsset): self
  53.     {
  54.         $this->audioAsset $audioAsset;
  55.         return $this;
  56.     }
  57.     public function getType(): string
  58.     {
  59.         return $this->type;
  60.     }
  61.     public function setType(string $type): self
  62.     {
  63.         $this->type $type;
  64.         return $this;
  65.     }
  66.     public function getParameters(): array
  67.     {
  68.         return $this->parameters;
  69.     }
  70.     public function setParameters(array $parameters): self
  71.     {
  72.         $this->parameters $parameters;
  73.         return $this;
  74.     }
  75.     public function getStatus(): string
  76.     {
  77.         return $this->status;
  78.     }
  79.     public function setStatus(string $status): self
  80.     {
  81.         $this->status $status;
  82.         return $this;
  83.     }
  84.     public function getOutputPath(): ?string
  85.     {
  86.         return $this->outputPath;
  87.     }
  88.     public function setOutputPath(?string $outputPath): self
  89.     {
  90.         $this->outputPath $outputPath;
  91.         return $this;
  92.     }
  93.     public function getLog(): ?string
  94.     {
  95.         return $this->log;
  96.     }
  97.     public function setLog(?string $log): self
  98.     {
  99.         $this->log $log;
  100.         return $this;
  101.     }
  102.     public function getCreatedAt(): \DateTimeInterface
  103.     {
  104.         return $this->createdAt;
  105.     }
  106.     public function getStartedAt(): ?\DateTimeInterface
  107.     {
  108.         return $this->startedAt;
  109.     }
  110.     public function setStartedAt(?\DateTimeInterface $startedAt): self
  111.     {
  112.         $this->startedAt $startedAt;
  113.         return $this;
  114.     }
  115.     public function getFinishedAt(): ?\DateTimeInterface
  116.     {
  117.         return $this->finishedAt;
  118.     }
  119.     public function setFinishedAt(?\DateTimeInterface $finishedAt): self
  120.     {
  121.         $this->finishedAt $finishedAt;
  122.         return $this;
  123.     }
  124. }