<?php

declare(strict_types=1);

namespace App\Framework\Scheduler\Contracts;

use App\Framework\Core\ValueObjects\Timestamp;

/**
 * Interface for recurring schedule definitions
 */
interface ScheduleInterface
{
    /**
     * Get the next execution time based on the current time
     */
    public function getNextExecution(?Timestamp $from = null): ?Timestamp;

    /**
     * Check if this schedule should execute at the given time
     */
    public function shouldExecuteAt(Timestamp $time): bool;

    /**
     * Get a human-readable description of this schedule
     */
    public function getDescription(): string;

    /**
     * Get the schedule type identifier
     */
    public function getType(): string;

    /**
     * Convert schedule to array representation
     */
    public function toArray(): array;
}
