<?php
namespace App\Entity;
use App\Repository\ChecklistActivityRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ChecklistActivityRepository::class)]
class ChecklistActivity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\ManyToOne(inversedBy: 'checklistActivities')]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?Checklist $checklist = null;
#[ORM\ManyToOne(inversedBy: 'checklistActivities')]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?ChecklistTask $task = null;
#[ORM\ManyToOne(inversedBy: 'checklistActivities')]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?User $user = null;
#[ORM\Column(nullable: true)]
private array $payload = [];
public function getId(): ?int
{
return $this->id;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getChecklist(): ?Checklist
{
return $this->checklist;
}
public function setChecklist(?Checklist $checklist): self
{
$this->checklist = $checklist;
return $this;
}
public function getTask(): ?ChecklistTask
{
return $this->task;
}
public function setTask(?ChecklistTask $task): self
{
$this->task = $task;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getPayload(): array
{
return $this->payload;
}
public function setPayload(?array $payload): self
{
$this->payload = $payload;
return $this;
}
}