90 lines
2.1 KiB
PHP
90 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\CommandTaskScheduleRepository;
|
|
use Doctrine\DBAL\Types\Types;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: CommandTaskScheduleRepository::class)]
|
|
class CommandTaskSchedule extends AbstractEntity
|
|
{
|
|
use ToggleableTrait;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $recurrenceType = null;
|
|
|
|
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
|
|
private ?\DateTimeInterface $executionDate = null;
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
private ?array $recurrenceDetails = null;
|
|
|
|
#[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'commandTaskSchedules')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?CommandTask $commandTask = null;
|
|
|
|
#[ORM\Column(type: Types::TIME_MUTABLE, nullable: true)]
|
|
private ?\DateTimeInterface $executionTime = null;
|
|
|
|
public function getRecurrenceType(): ?string
|
|
{
|
|
return $this->recurrenceType;
|
|
}
|
|
|
|
public function setRecurrenceType(string $recurrenceType): static
|
|
{
|
|
$this->recurrenceType = $recurrenceType;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getRecurrenceDetails(): ?array
|
|
{
|
|
return $this->recurrenceDetails;
|
|
}
|
|
|
|
public function setRecurrenceDetails(?array $recurrenceDetails): static
|
|
{
|
|
$this->recurrenceDetails = $recurrenceDetails;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCommandTask(): ?CommandTask
|
|
{
|
|
return $this->commandTask;
|
|
}
|
|
|
|
public function setCommandTask(?CommandTask $commandTask): static
|
|
{
|
|
$this->commandTask = $commandTask;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getExecutionTime(): ?\DateTimeInterface
|
|
{
|
|
return $this->executionTime;
|
|
}
|
|
|
|
public function setExecutionTime(?\DateTimeInterface $executionTime): static
|
|
{
|
|
$this->executionTime = $executionTime;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getExecutionDate(): ?\DateTimeInterface
|
|
{
|
|
return $this->executionDate;
|
|
}
|
|
|
|
public function setExecutionDate(?\DateTimeInterface $executionDate): static
|
|
{
|
|
$this->executionDate = $executionDate;
|
|
|
|
return $this;
|
|
}
|
|
}
|