<?php
namespace App\Entity;
use App\Repository\InviteeRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=InviteeRepository::class)
* @ORM\Table(indexes={
* @ORM\Index(name="login_code_idx", columns={"login_code"}),
* @ORM\Index(name="email_idx", columns={"email"}),
* }))
*/
class Invitee implements LoginCodeInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=128)
*/
private $email;
/**
* @ORM\ManyToOne(targetEntity=Purchase::class, inversedBy="invitees")
* @ORM\JoinColumn(nullable=false)
*/
private $purchase;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $loginCode;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $loginCodeExpireAt;
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getPurchase(): ?Purchase
{
return $this->purchase;
}
public function setPurchase(?Purchase $purchase): self
{
$this->purchase = $purchase;
return $this;
}
public function getLoginCode(): ?string
{
return $this->loginCode;
}
public function setLoginCode(?string $loginCode): self
{
$this->loginCode = $loginCode;
return $this;
}
public function getLoginCodeExpireAt(): ?\DateTimeImmutable
{
return $this->loginCodeExpireAt;
}
public function setLoginCodeExpireAt(?\DateTimeImmutable $loginCodeExpireAt): self
{
$this->loginCodeExpireAt = $loginCodeExpireAt;
return $this;
}
}