src/Entity/Complaint.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ComplaintRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ComplaintRepository::class)
  7.  */
  8. class Complaint
  9. {
  10.     const STATUS_NEW 0;
  11.     const STATUS_IN_WORK 1;
  12.     const STATUS_CLOSED 2;
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="complaints")
  21.      * @ORM\JoinColumn(nullable=false)
  22.      */
  23.     private $author;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=User::class)
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $forUser;
  29.     /**
  30.      * @ORM\Column(type="json", nullable=true)
  31.      */
  32.     private $detail;
  33.     /**
  34.      * @ORM\Column(type="datetime")
  35.      */
  36.     private $date;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity=SpeakerConsultation::class)
  39.      */
  40.     private $consultation;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=Chat::class)
  43.      */
  44.     private $chat;
  45.     /**
  46.      * @ORM\Column(type="integer")
  47.      */
  48.     private $status self::STATUS_NEW;
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getAuthor(): ?User
  54.     {
  55.         return $this->author;
  56.     }
  57.     public function setAuthor(?User $author): self
  58.     {
  59.         $this->author $author;
  60.         return $this;
  61.     }
  62.     public function getForUser(): ?User
  63.     {
  64.         return $this->forUser;
  65.     }
  66.     public function setForUser(?User $forUser): self
  67.     {
  68.         $this->forUser $forUser;
  69.         return $this;
  70.     }
  71.     public function getDetail(): ?array
  72.     {
  73.         return $this->detail;
  74.     }
  75.     public function setDetail(?array $detail): self
  76.     {
  77.         $this->detail $detail;
  78.         return $this;
  79.     }
  80.     public function getDate(): ?\DateTimeInterface
  81.     {
  82.         return $this->date;
  83.     }
  84.     public function setDate(\DateTimeInterface $date): self
  85.     {
  86.         $this->date $date;
  87.         return $this;
  88.     }
  89.     public function getConsultation(): ?SpeakerConsultation
  90.     {
  91.         return $this->consultation;
  92.     }
  93.     public function setConsultation(?SpeakerConsultation $consultation): self
  94.     {
  95.         $this->consultation $consultation;
  96.         return $this;
  97.     }
  98.     public function getChat(): ?Chat
  99.     {
  100.         return $this->chat;
  101.     }
  102.     public function setChat(?Chat $chat): self
  103.     {
  104.         $this->chat $chat;
  105.         return $this;
  106.     }
  107.     public function getStatus(): ?int
  108.     {
  109.         return $this->status;
  110.     }
  111.     public function setStatus(int $status): self
  112.     {
  113.         $this->status $status;
  114.         return $this;
  115.     }
  116. }