src/Entity/Invitee.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InviteeRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=InviteeRepository::class)
  7.  * @ORM\Table(indexes={
  8.  *     @ORM\Index(name="login_code_idx", columns={"login_code"}),
  9.  *     @ORM\Index(name="email_idx", columns={"email"}),
  10.  * }))
  11.  */
  12. class Invitee implements LoginCodeInterface
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=128)
  22.      */
  23.     private $email;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Purchase::class, inversedBy="invitees")
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $purchase;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $loginCode;
  33.     /**
  34.      * @ORM\Column(type="datetime_immutable", nullable=true)
  35.      */
  36.     private $loginCodeExpireAt;
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getEmail(): ?string
  42.     {
  43.         return $this->email;
  44.     }
  45.     public function setEmail(string $email): self
  46.     {
  47.         $this->email $email;
  48.         return $this;
  49.     }
  50.     public function getPurchase(): ?Purchase
  51.     {
  52.         return $this->purchase;
  53.     }
  54.     public function setPurchase(?Purchase $purchase): self
  55.     {
  56.         $this->purchase $purchase;
  57.         return $this;
  58.     }
  59.     public function getLoginCode(): ?string
  60.     {
  61.         return $this->loginCode;
  62.     }
  63.     public function setLoginCode(?string $loginCode): self
  64.     {
  65.         $this->loginCode $loginCode;
  66.         return $this;
  67.     }
  68.     public function getLoginCodeExpireAt(): ?\DateTimeImmutable
  69.     {
  70.         return $this->loginCodeExpireAt;
  71.     }
  72.     public function setLoginCodeExpireAt(?\DateTimeImmutable $loginCodeExpireAt): self
  73.     {
  74.         $this->loginCodeExpireAt $loginCodeExpireAt;
  75.         return $this;
  76.     }
  77. }