Moved entities mappings from annotations to external config files

This commit is contained in:
Alejandro Celaya
2018-12-16 12:08:03 +01:00
parent fb705b44a4
commit a28c1d17c5
13 changed files with 244 additions and 172 deletions

View File

@@ -4,36 +4,18 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\Rest\Entity;
use Cake\Chronos\Chronos;
use Doctrine\ORM\Mapping as ORM;
use Shlinkio\Shlink\Common\Entity\AbstractEntity;
use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
/**
* Class ApiKey
* @author Shlink
* @link http://shlink.io
*
* @ORM\Entity()
* @ORM\Table(name="api_keys")
*/
class ApiKey extends AbstractEntity
{
use StringUtilsTrait;
/**
* @var string
* @ORM\Column(name="`key`", nullable=false, unique=true)
*/
/** @var string */
private $key;
/**
* @var Chronos|null
* @ORM\Column(name="expiration_date", nullable=true, type="chronos_datetime")
*/
/** @var Chronos|null */
private $expirationDate;
/**
* @var bool
* @ORM\Column(type="boolean")
*/
/** @var bool */
private $enabled;
public function __construct(?Chronos $expirationDate = null)