<?php
namespace App\Entity;
use App\Entity\Common\SoftDeletableEntityTrait;
use App\Entity\Common\StatefulEntityTrait;
use App\Entity\Common\TimestampedEntityTrait;
use Doctrine\ORM\Mapping\UniqueConstraint;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Class Token
*
* @ORM\Entity(repositoryClass="App\Repository\TokenRepository")
* @ORM\Table(indexes={
* @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
* @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
* @ORM\Index(name="IDX_is_active", columns={"is_active"})
* })
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*/
class Token
{
use SoftDeletableEntityTrait, StatefulEntityTrait, TimestampedEntityTrait;
/**
* @ORM\Id()
* @ORM\ManyToOne(targetEntity="CompanyUser")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;
/**
* @ORM\Column(type="text", nullable=false)
*/
private $data;
/**
* @var DateTime
*
* @ORM\Column(type="datetime")
*/
private $expiresAt;
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user): void
{
$this->user = $user;
}
/**
* @return mixed
*/
public function getData()
{
return $this->data;
}
/**
* @param mixed $data
*/
public function setData($data): void
{
$this->data = $data;
}
/**
* @return DateTime
*/
public function getExpiresAt(): DateTime
{
return $this->expiresAt;
}
/**
* @param DateTime $expiresAt
*/
public function setExpiresAt(DateTime $expiresAt): void
{
$this->expiresAt = $expiresAt;
}
}