<?php

declare(strict_types=1);

namespace App\Framework\Deployment\Pipeline\Events;

use App\Framework\Core\ValueObjects\Duration;
use App\Framework\Deployment\Pipeline\ValueObjects\PipelineId;
use App\Framework\Deployment\Pipeline\ValueObjects\PipelineStage;

/**
 * Stage Completed Event
 *
 * Dispatched when a pipeline stage completes execution.
 */
final readonly class StageCompleted
{
    public function __construct(
        public PipelineId $pipelineId,
        public PipelineStage $stage,
        public bool $success,
        public Duration $duration,
        public \DateTimeImmutable $timestamp
    ) {}
}
