<?php

declare(strict_types=1);

namespace App\Framework\EventSourcing\Snapshots;

use App\Framework\Core\ValueObjects\Timestamp;
use App\Framework\EventSourcing\AggregateId;

/**
 * Snapshot Interface
 *
 * Represents a saved state of an aggregate at a specific version
 * to avoid replaying all events when loading
 */
interface SnapshotInterface
{
    /**
     * Get aggregate ID this snapshot belongs to
     */
    public function getAggregateId(): AggregateId;

    /**
     * Get aggregate version at snapshot time
     */
    public function getVersion(): int;

    /**
     * Get aggregate state data
     */
    public function getState(): array;

    /**
     * Get snapshot creation timestamp
     */
    public function getCreatedAt(): Timestamp;

    /**
     * Get aggregate class name
     */
    public function getAggregateClass(): string;
}
