src/Entity/Report.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Entity]
  5. #[ORM\Table(name'report')]
  6. class Report
  7. {
  8.     #[ORM\Column(type'integer'uniquetrue)]
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     private $id;
  12.     #[ORM\Column(name'status'type'string')]
  13.     private $status;
  14.     #[ORM\ManyToOne(targetEntity'App\Entity\User')]
  15.     #[ORM\JoinColumn(name'creator'referencedColumnName'id'nullablefalseonDelete'CASCADE')]
  16.     private $creator;
  17.     #[ORM\ManyToOne(targetEntityReportType::class, inversedBy'reports')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private $reportType;
  20.     #[ORM\Column(type'string'length255)]
  21.     private $message;
  22.     #[ORM\Column(type'datetime')]
  23.     private $createdAt;
  24.     #[ORM\Column(type'string'length50)]
  25.     private $entity;
  26.     #[ORM\Column(type'integer')]
  27.     private $entityId;
  28.     #[ORM\OneToOne(targetEntityAdapterContent::class, mappedBy'report'cascade: ['persist''remove'])]
  29.     private $adapterContent;
  30.     /**
  31.      * @return mixed
  32.      */
  33.     public function getId()
  34.     {
  35.         return $this->id;
  36.     }
  37.     /**
  38.      * @param mixed $id
  39.      */
  40.     public function setId($id)
  41.     {
  42.         $this->id $id;
  43.     }
  44.     /**
  45.      * @return mixed
  46.      */
  47.     public function getCreator()
  48.     {
  49.         return $this->creator->getId();
  50.     }
  51.     /**
  52.      * @param mixed $creator
  53.      */
  54.     public function setCreator($creator)
  55.     {
  56.         $this->creator $creator;
  57.     }
  58.     /**
  59.      * @return mixed
  60.      */
  61.     public function getStatus()
  62.     {
  63.         return $this->status;
  64.     }
  65.     /**
  66.      * @param mixed $status
  67.      */
  68.     public function setStatus($status)
  69.     {
  70.         $this->status $status;
  71.     }
  72.     public function getReportType()
  73.     {
  74.         return $this->reportType->getId();
  75.     }
  76.     public function setReportType(?ReportType $reportType): self
  77.     {
  78.         $this->reportType $reportType;
  79.         return $this;
  80.     }
  81.     public function getMessage(): ?string
  82.     {
  83.         return $this->message;
  84.     }
  85.     public function setMessage(string $message): self
  86.     {
  87.         $this->message $message;
  88.         return $this;
  89.     }
  90.     public function getCreatedAt(): ?\DateTimeInterface
  91.     {
  92.         return $this->createdAt;
  93.     }
  94.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  95.     {
  96.         $this->createdAt $createdAt;
  97.         return $this;
  98.     }
  99.     public function getEntity(): ?string
  100.     {
  101.         return $this->entity;
  102.     }
  103.     public function setEntity(string $entity): self
  104.     {
  105.         $this->entity $entity;
  106.         return $this;
  107.     }
  108.     public function getEntityId(): ?int
  109.     {
  110.         return $this->entityId;
  111.     }
  112.     public function setEntityId(int $entityId): self
  113.     {
  114.         $this->entityId $entityId;
  115.         return $this;
  116.     }
  117.     public function getAdapterContent(): ?AdapterContent
  118.     {
  119.         return $this->adapterContent;
  120.     }
  121.     public function setAdapterContent(?AdapterContent $adapterContent): self
  122.     {
  123.         // unset the owning side of the relation if necessary
  124.         if ($adapterContent === null && $this->adapterContent !== null) {
  125.             $this->adapterContent->setReport(null);
  126.         }
  127.         // set the owning side of the relation if necessary
  128.         if ($adapterContent !== null && $adapterContent->getReport() !== $this) {
  129.             $adapterContent->setReport($this);
  130.         }
  131.         $this->adapterContent $adapterContent;
  132.         return $this;
  133.     }
  134. }