* SPDX-License-Identifier: AGPL-3.0-or-later */ namespace KTXF\Chrono\Entity; use KTXF\Resource\Identifier\EntityIdentifier; use KTXF\Resource\Provider\Node\NodeBaseAbstract; /** * Abstract Chrono Entity Base Class * * Provides common implementation for chrono entities * * @since 2025.05.01 */ abstract class EntityBaseAbstract extends NodeBaseAbstract implements EntityBaseInterface { protected string $type = 'chrono:entity'; protected EventObject|TaskObject|JournalObject $properties; protected function nodeIdentifier(): EntityIdentifier { return new EntityIdentifier($this->data[static::PROPERTY_PROVIDER], $this->data[static::PROPERTY_SERVICE], $this->data[static::PROPERTY_COLLECTION], $this->data[static::PROPERTY_IDENTIFIER]); } /** * @inheritDoc */ public function getProperties(): EventObject|TaskObject|JournalObject { return $this->properties ??= new EventObject(); } }