Add 'type' field to Plate object
This commit is contained in:
parent
3330635d64
commit
64a66e98c8
@ -6,6 +6,20 @@ use JMS\Serializer\Annotation as Serializer;
|
||||
|
||||
class Plate
|
||||
{
|
||||
public const TYPE_ORDER = 'order';
|
||||
public const TYPE_SHIPMENT = 'shipment';
|
||||
|
||||
/**
|
||||
* Тип сущности для печатной формы
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @Serializer\Groups({"get", "set"})
|
||||
* @Serializer\SerializedName("type")
|
||||
* @Serializer\Type("string")
|
||||
*/
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* Код печатной формы
|
||||
*
|
||||
@ -28,9 +42,10 @@ class Plate
|
||||
*/
|
||||
public $label;
|
||||
|
||||
public function __construct($code, $label)
|
||||
public function __construct($code, $label, $type = self::TYPE_ORDER)
|
||||
{
|
||||
$this->code = $code;
|
||||
$this->label = $label;
|
||||
$this->type = $type;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user