<?php
namespace App\Entity;
use App\Enum\BattleInviteStatusType;
use App\Repository\BattleInviteRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: BattleInviteRepository::class)]
class BattleInvite
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\OneToOne(inversedBy: 'battleInvite', cascade: ['persist', 'remove'])]
private ?Battle $battle = null;
#[ORM\Column(length: 255)]
private ?string $token = null;
#[ORM\Column]
private ?BattleInviteStatusType $status = null;
#[ORM\Column(nullable: true)]
private ?\DateTime $createdAt = null;
#[ORM\Column(nullable: true)]
private ?\DateTime $validTo = null;
public function getId(): ?int
{
return $this->id;
}
public function getBattle(): ?Battle
{
return $this->battle;
}
public function setBattle(?Battle $battle): static
{
$this->battle = $battle;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(string $token): static
{
$this->token = $token;
return $this;
}
public function getCreatedAt(): ?\DateTime
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTime $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getValidTo(): ?\DateTime
{
return $this->validTo;
}
public function setValidTo(?\DateTime $validTo): static
{
$this->validTo = $validTo;
return $this;
}
public function getStatus(): ?BattleInviteStatusType
{
return $this->status;
}
public function setStatus(BattleInviteStatusType $status): static
{
$this->status = $status;
return $this;
}
}