<?php
namespace App\Entity;
use App\Repository\ComplaintRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ComplaintRepository::class)
*/
class Complaint
{
const STATUS_NEW = 0;
const STATUS_IN_WORK = 1;
const STATUS_CLOSED = 2;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="complaints")
* @ORM\JoinColumn(nullable=false)
*/
private $author;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
*/
private $forUser;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $detail;
/**
* @ORM\Column(type="datetime")
*/
private $date;
/**
* @ORM\ManyToOne(targetEntity=SpeakerConsultation::class)
*/
private $consultation;
/**
* @ORM\ManyToOne(targetEntity=Chat::class)
*/
private $chat;
/**
* @ORM\Column(type="integer")
*/
private $status = self::STATUS_NEW;
public function getId(): ?int
{
return $this->id;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): self
{
$this->author = $author;
return $this;
}
public function getForUser(): ?User
{
return $this->forUser;
}
public function setForUser(?User $forUser): self
{
$this->forUser = $forUser;
return $this;
}
public function getDetail(): ?array
{
return $this->detail;
}
public function setDetail(?array $detail): self
{
$this->detail = $detail;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getConsultation(): ?SpeakerConsultation
{
return $this->consultation;
}
public function setConsultation(?SpeakerConsultation $consultation): self
{
$this->consultation = $consultation;
return $this;
}
public function getChat(): ?Chat
{
return $this->chat;
}
public function setChat(?Chat $chat): self
{
$this->chat = $chat;
return $this;
}
public function getStatus(): ?int
{
return $this->status;
}
public function setStatus(int $status): self
{
$this->status = $status;
return $this;
}
}