<?php
namespace App\Entity;
use App\Repository\PostReportRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PostReportRepository::class)]
class PostReport
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'postReports')]
#[ORM\JoinColumn(nullable: false)]
private ?Post $post = null;
#[ORM\ManyToOne(inversedBy: 'postReports')]
#[ORM\JoinColumn(nullable: false)]
private ?User $reported_by_user_id = null;
#[ORM\Column(length: 50)]
private ?string $reason = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $created_at = null;
public function getId(): ?int
{
return $this->id;
}
public function getPost(): ?Post
{
return $this->post;
}
public function setPost(?Post $post): static
{
$this->post = $post;
return $this;
}
public function getReportedByUserId(): ?User
{
return $this->reported_by_user_id;
}
public function setReportedByUserId(?User $reported_by_user_id): static
{
$this->reported_by_user_id = $reported_by_user_id;
return $this;
}
public function getReason(): ?string
{
return $this->reason;
}
public function setReason(string $reason): static
{
$this->reason = $reason;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): static
{
$this->created_at = $created_at;
return $this;
}
}