<?php declare(strict_types=1);
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
{
    /**
     * Original identifier from toubiz.
     * @var string|null
     * @ORM\Column(length=50)
     */
    protected $originalId;

    public function getOriginalId(): ?string
    {
        return $this->originalId;
    }

    public function setOriginalId(?string $originalId): void
    {
        $this->originalId = $originalId;
    }

    public function getPersistenceObjectIdentifier(): string
    {
        return $this->Persistence_Object_Identifier;
    }

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