src/Entity/TrashTalk.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TrashTalkRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassTrashTalkRepository::class)]
  8. class TrashTalk
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     #[Groups(['trash_talk'])]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(targetEntitySeason::class)]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?Season $season null;
  18.     #[ORM\ManyToOne(targetEntityUser::class)]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     #[Groups(['trash_talk'])]
  21.     private ?User $user null;
  22.     #[ORM\Column(typeTypes::TEXT)]
  23.     #[Groups(['trash_talk'])]
  24.     private ?string $content null;
  25.     #[ORM\Column]
  26.     #[Groups(['trash_talk'])]
  27.     private ?\DateTimeImmutable $createdAt null;
  28.     #[ORM\Column(nullabletrue)]
  29.     #[Groups(['trash_talk'])]
  30.     private ?\DateTimeImmutable $updatedAt null;
  31.     #[ORM\Column]
  32.     #[Groups(['trash_talk'])]
  33.     private bool $isDeleted false;
  34.     public function __construct()
  35.     {
  36.         $this->createdAt = new \DateTimeImmutable();
  37.         $this->isDeleted false;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getSeason(): ?Season
  44.     {
  45.         return $this->season;
  46.     }
  47.     public function setSeason(?Season $season): static
  48.     {
  49.         $this->season $season;
  50.         return $this;
  51.     }
  52.     public function getUser(): ?User
  53.     {
  54.         return $this->user;
  55.     }
  56.     public function setUser(?User $user): static
  57.     {
  58.         $this->user $user;
  59.         return $this;
  60.     }
  61.     public function getContent(): ?string
  62.     {
  63.         return $this->content;
  64.     }
  65.     public function setContent(string $content): static
  66.     {
  67.         $this->content $content;
  68.         return $this;
  69.     }
  70.     public function getCreatedAt(): ?\DateTimeImmutable
  71.     {
  72.         return $this->createdAt;
  73.     }
  74.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  75.     {
  76.         $this->createdAt $createdAt;
  77.         return $this;
  78.     }
  79.     public function getUpdatedAt(): ?\DateTimeImmutable
  80.     {
  81.         return $this->updatedAt;
  82.     }
  83.     public function setUpdatedAt(?\DateTimeImmutable $updatedAt): static
  84.     {
  85.         $this->updatedAt $updatedAt;
  86.         return $this;
  87.     }
  88.     public function isIsDeleted(): bool
  89.     {
  90.         return $this->isDeleted;
  91.     }
  92.     public function setIsDeleted(bool $isDeleted): static
  93.     {
  94.         $this->isDeleted $isDeleted;
  95.         return $this;
  96.     }
  97. }