2014-04-07 15:25:16 +02:00
|
|
|
<?php
|
2020-03-10 11:13:12 +01:00
|
|
|
|
2021-04-20 01:18:17 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2014-04-07 15:25:16 +02:00
|
|
|
namespace DigiComp\Sequence\Domain\Model;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2017-03-13 16:59:04 +01:00
|
|
|
use Neos\Flow\Annotations as Flow;
|
2016-06-24 19:40:43 +02:00
|
|
|
|
2014-04-07 15:25:16 +02:00
|
|
|
/**
|
|
|
|
* @Flow\Entity
|
2021-09-22 14:26:09 +02:00
|
|
|
* @ORM\Table(indexes={
|
|
|
|
* @ORM\Index(columns={"type"})
|
|
|
|
* }, uniqueConstraints={
|
|
|
|
* @ORM\UniqueConstraint(columns={"type", "number"})
|
|
|
|
* })
|
2014-04-07 15:25:16 +02:00
|
|
|
*/
|
2021-09-22 11:34:34 +02:00
|
|
|
class SequenceEntry
|
2016-06-24 19:40:43 +02:00
|
|
|
{
|
|
|
|
/**
|
2021-08-26 10:50:00 +02:00
|
|
|
* @var string
|
2016-06-24 19:40:43 +02:00
|
|
|
*/
|
2021-04-20 01:18:17 +02:00
|
|
|
protected string $type;
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
2021-09-22 11:34:34 +02:00
|
|
|
* @var int
|
2017-03-13 16:59:04 +01:00
|
|
|
*/
|
2021-09-22 11:34:34 +02:00
|
|
|
protected int $number;
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
2021-09-22 11:34:34 +02:00
|
|
|
* @param string $type
|
2016-06-24 19:40:43 +02:00
|
|
|
* @param int $number
|
|
|
|
*/
|
2021-09-22 11:34:34 +02:00
|
|
|
public function __construct(string $type, int $number)
|
2016-06-24 19:40:43 +02:00
|
|
|
{
|
2021-09-22 11:34:34 +02:00
|
|
|
$this->type = $type;
|
2016-06-24 19:40:43 +02:00
|
|
|
$this->number = $number;
|
|
|
|
}
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
2017-03-13 16:59:04 +01:00
|
|
|
* @return string
|
2016-06-24 19:40:43 +02:00
|
|
|
*/
|
2021-04-20 01:18:17 +02:00
|
|
|
public function getType(): string
|
2016-06-24 19:40:43 +02:00
|
|
|
{
|
2017-03-13 16:59:04 +01:00
|
|
|
return $this->type;
|
2016-06-24 19:40:43 +02:00
|
|
|
}
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
2021-09-22 11:34:34 +02:00
|
|
|
* @return int
|
2016-06-24 19:40:43 +02:00
|
|
|
*/
|
2021-09-22 11:34:34 +02:00
|
|
|
public function getNumber(): int
|
2016-06-24 19:40:43 +02:00
|
|
|
{
|
2021-09-22 11:34:34 +02:00
|
|
|
return $this->number;
|
2016-06-24 19:40:43 +02:00
|
|
|
}
|
|
|
|
}
|