<?php
namespace App\Entity;
use App\Repository\TrashTalkRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: TrashTalkRepository::class)]
class TrashTalk
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Groups(['trash_talk'])]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: Season::class)]
#[ORM\JoinColumn(nullable: false)]
private ?Season $season = null;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
#[Groups(['trash_talk'])]
private ?User $user = null;
#[ORM\Column(type: Types::TEXT)]
#[Groups(['trash_talk'])]
private ?string $content = null;
#[ORM\Column]
#[Groups(['trash_talk'])]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(nullable: true)]
#[Groups(['trash_talk'])]
private ?\DateTimeImmutable $updatedAt = null;
#[ORM\Column]
#[Groups(['trash_talk'])]
private bool $isDeleted = false;
public function __construct()
{
$this->createdAt = new \DateTimeImmutable();
$this->isDeleted = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getSeason(): ?Season
{
return $this->season;
}
public function setSeason(?Season $season): static
{
$this->season = $season;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): static
{
$this->user = $user;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(string $content): static
{
$this->content = $content;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeImmutable $updatedAt): static
{
$this->updatedAt = $updatedAt;
return $this;
}
public function isIsDeleted(): bool
{
return $this->isDeleted;
}
public function setIsDeleted(bool $isDeleted): static
{
$this->isDeleted = $isDeleted;
return $this;
}
}