2014-04-07 15:25:16 +02:00
|
|
|
<?php
|
2020-03-10 11:13:12 +01:00
|
|
|
|
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
|
|
|
/**
|
|
|
|
* SequenceInsert
|
|
|
|
*
|
|
|
|
* @Flow\Entity
|
2019-12-04 12:48:02 +01:00
|
|
|
* @ORM\Table(indexes={
|
|
|
|
* @ORM\Index(name="type_idx", columns={"type"})
|
|
|
|
* })
|
2014-04-07 15:25:16 +02:00
|
|
|
*/
|
2016-06-24 19:40:43 +02:00
|
|
|
class Insert
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @Flow\Identity
|
2017-03-13 16:59:04 +01:00
|
|
|
* @ORM\Id
|
2022-04-30 21:38:36 +02:00
|
|
|
* @var int
|
2016-06-24 19:40:43 +02:00
|
|
|
*/
|
|
|
|
protected $number;
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @Flow\Identity
|
2017-03-13 16:59:04 +01:00
|
|
|
* @ORM\Id
|
2022-04-30 21:38:36 +02:00
|
|
|
* @var string
|
2016-06-24 19:40:43 +02:00
|
|
|
*/
|
|
|
|
protected $type;
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
2017-03-13 16:59:04 +01:00
|
|
|
* @param int $number
|
2016-06-24 19:40:43 +02:00
|
|
|
* @param string|object $type
|
|
|
|
*/
|
|
|
|
public function __construct($number, $type)
|
|
|
|
{
|
|
|
|
$this->setNumber($number);
|
2017-03-13 16:59:04 +01:00
|
|
|
$this->setType($type);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getNumber()
|
|
|
|
{
|
|
|
|
return $this->number;
|
2016-06-24 19:40:43 +02:00
|
|
|
}
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @param int $number
|
|
|
|
*/
|
|
|
|
public function setNumber($number)
|
|
|
|
{
|
|
|
|
$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
|
|
|
*/
|
2017-03-13 16:59:04 +01:00
|
|
|
public function getType()
|
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
|
|
|
/**
|
|
|
|
* @param string|object $type
|
|
|
|
*/
|
|
|
|
public function setType($type)
|
|
|
|
{
|
2022-04-30 21:38:36 +02:00
|
|
|
if (\is_object($type)) {
|
|
|
|
$type = \get_class($type);
|
2016-06-24 19:40:43 +02:00
|
|
|
}
|
|
|
|
$this->type = $type;
|
|
|
|
}
|
|
|
|
}
|