<?php
namespace App\Entity;
use App\Repository\StaffComplaintRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: StaffComplaintRepository::class), ORM\Table(name: 'staff_complaints')]
class StaffComplaint
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'text'), Assert\NotBlank]
private $description;
#[ORM\Column(type: 'string', length: 100, nullable: true)]
private $complaintDoc;
#[ORM\Column(type: 'text'), Assert\NotBlank]
private $actionTaken;
#[ORM\Column(type: 'string', length: 100, nullable: true)]
private $actionDoc;
#[ORM\Column(type: 'boolean')]
private bool $isInquiryRequired = false;
#[Gedmo\Timestampable(on: 'create'), ORM\Column(type: 'datetime')]
private $createdAt;
#[Gedmo\Timestampable(on: 'update'), ORM\Column(type: 'datetime')]
private $updatedAt;
#[ORM\ManyToOne(targetEntity: StaffProfile::class, inversedBy: 'complaints'), ORM\JoinColumn(nullable: false)]
private $profile;
public function getId(): ?int
{
return $this->id;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = strip_tags($description);
return $this;
}
public function getComplaintDoc(): ?string
{
return $this->complaintDoc;
}
public function setComplaintDoc(?string $complaintDoc): self
{
$this->complaintDoc = $complaintDoc;
return $this;
}
public function getActionTaken(): ?string
{
return $this->actionTaken;
}
public function setActionTaken(string $actionTaken): self
{
$this->actionTaken = $actionTaken;
return $this;
}
public function getActionDoc(): ?string
{
return $this->actionDoc;
}
public function setActionDoc(?string $actionDoc): self
{
$this->actionDoc = $actionDoc;
return $this;
}
public function getIsInquiryRequired(): ?bool
{
return $this->isInquiryRequired;
}
public function setIsInquiryRequired(bool $isInquiryRequired): self
{
$this->isInquiryRequired = $isInquiryRequired;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function getProfile(): ?StaffProfile
{
return $this->profile;
}
public function setProfile(?StaffProfile $profile): self
{
$this->profile = $profile;
return $this;
}
}