<?php
namespace Newland\Toubiz\Sync\Neos\Domain\Model;

/*
 * This file is part of the "toubiz-sync-neos" package.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 */

use Doctrine\ORM\Mapping as ORM;

/**
 * Abstract entity.
 *
 * Base class for flow entities.
 *
 * @property string $Persistence_Object_Identifier
 */
abstract class AbstractEntity implements \JsonSerializable
{
    /**
     * @var string Original identifier from toubiz.
     * @ORM\Column(length=50)
     */
    protected $originalId;

    /**
     * @return string
     */
    public function getOriginalId()
    {
        return $this->originalId;
    }

    /**
     * @param string $originalId
     * @return void
     */
    public function setOriginalId($originalId)
    {
        $this->originalId = $originalId;
    }

    /**
     * @return string
     */
    public function getPersistenceObjectIdentifier()
    {
        return $this->Persistence_Object_Identifier;
    }


    public function jsonSerialize(): array
    {
        return get_object_vars($this);
    }
}
