src/Entity/Report.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ReportRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ReportRepository::class)
  9.  */
  10. class Report
  11. {
  12.     const RESOURCE_KEY 'reports';
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $reason;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="reports")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $reporter;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Journal::class, inversedBy="reports")
  30.      * @ORM\JoinColumn(name="journal", referencedColumnName="id")
  31.      */
  32.     private $journal;
  33.     /**
  34.      * @ORM\Column(type="datetime", nullable=true)
  35.      */
  36.     private $created_at;
  37.     public function __construct()
  38.     {
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getReason(): ?string
  45.     {
  46.         return $this->reason;
  47.     }
  48.     public function setReason(string $reason): self
  49.     {
  50.         $this->reason $reason;
  51.         return $this;
  52.     }
  53.     public function getReporter(): ?User
  54.     {
  55.         return $this->reporter;
  56.     }
  57.     public function setReporter(?User $reporter): self
  58.     {
  59.         $this->reporter $reporter;
  60.         return $this;
  61.     }
  62.     public function getJournal()
  63.     {
  64.         return $this->journal;
  65.     }
  66.     public function setJournal(?Journal $journal): self
  67.     {
  68.         $this->journal $journal;
  69.         return $this;
  70.     }
  71.     public function getCreatedAt(): ?\DateTime
  72.     {
  73.         return $this->created_at;
  74.     }
  75.     public function setCreatedAt(?\DateTime $created_at): self
  76.     {
  77.         $this->created_at $created_at;
  78.         return $this;
  79.     }
  80. }