src/Entity/PostReport.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PostReportRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassPostReportRepository::class)]
  7. class PostReport
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'postReports')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private ?Post $post null;
  16.     #[ORM\ManyToOne(inversedBy'postReports')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?User $reported_by_user_id null;
  19.     #[ORM\Column(length50)]
  20.     private ?string $reason null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  22.     private ?\DateTimeInterface $created_at null;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getPost(): ?Post
  28.     {
  29.         return $this->post;
  30.     }
  31.     public function setPost(?Post $post): static
  32.     {
  33.         $this->post $post;
  34.         return $this;
  35.     }
  36.     public function getReportedByUserId(): ?User
  37.     {
  38.         return $this->reported_by_user_id;
  39.     }
  40.     public function setReportedByUserId(?User $reported_by_user_id): static
  41.     {
  42.         $this->reported_by_user_id $reported_by_user_id;
  43.         return $this;
  44.     }
  45.     public function getReason(): ?string
  46.     {
  47.         return $this->reason;
  48.     }
  49.     public function setReason(string $reason): static
  50.     {
  51.         $this->reason $reason;
  52.         return $this;
  53.     }
  54.     public function getCreatedAt(): ?\DateTimeInterface
  55.     {
  56.         return $this->created_at;
  57.     }
  58.     public function setCreatedAt(\DateTimeInterface $created_at): static
  59.     {
  60.         $this->created_at $created_at;
  61.         return $this;
  62.     }
  63. }