DigiComp.Sequence/Classes/Domain/Model/Insert.php

75 lines
1.2 KiB
PHP
Raw Normal View History

2014-04-07 15:25:16 +02:00
<?php
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
*
* @author fcool
* @Flow\Entity
* @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
{
/**
* @var int
* @Flow\Identity
2017-03-13 16:59:04 +01:00
* @ORM\Id
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
/**
* @var string
* @Flow\Identity
2017-03-13 16:59:04 +01:00
* @ORM\Id
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)
{
if (is_object($type)) {
$type = get_class($type);
}
$this->type = $type;
}
}