<?php
namespace App\Admin\Entity;
use App\Admin\Enum\ApprovalStatus;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* StdPagesApprovalComments
*/
#[ORM\Table(name: 'std_pages_approval_comments')]
#[ORM\Entity(repositoryClass: 'App\Admin\Repository\StdPagesApprovalCommentsRepository')]
class StdPagesApprovalComments
{
#[ORM\Column(name: 'id', type: 'integer', nullable: false, options: ['unsigned' => true, 'comment' => 'Unique identifier'])]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private $id;
#[ORM\ManyToOne(targetEntity: StdPagesApprovalStatus::class, inversedBy: 'comments')]
#[ORM\JoinColumn(name: 'approval_status_id', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')]
private StdPagesApprovalStatus $approvalStatus;
#[ORM\ManyToOne(targetEntity: StdUsers::class)]
#[ORM\JoinColumn(name: 'author_id', referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
private ?StdUsers $author = null;
#[ORM\Column(name: 'comment', type: 'string', length: 255, nullable: true, options: ['comment' => 'Comment of the Approval'])]
private string $comment;
#[ORM\Column(name: 'created_at', type: 'datetime_immutable', nullable: false, options: ['comment' => 'Date of the comment'])]
private \DateTimeImmutable $createdAt;
public function getId(): int
{
return $this->id;
}
public function getApprovalStatus(): StdPagesApprovalStatus
{
return $this->approvalStatus;
}
public function setApprovalStatus(StdPagesApprovalStatus|null $approvalStatus): void
{
$this->approvalStatus = $approvalStatus;
}
public function getAuthor(): ?StdUsers
{
return $this->author;
}
public function setAuthor(?StdUsers $author): void
{
$this->author = $author;
}
public function getComment()
{
return $this->comment;
}
public function setComment($comment): void
{
$this->comment = $comment;
}
public function getCreatedAt(): \DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): void
{
$this->createdAt = $createdAt;
}
}