<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

/**
 * Append-only run event. Eloquent manages created_at only (no updated_at).
 */
class ProvisioningStepEvent extends Model
{
    public const UPDATED_AT = null;

    protected $fillable = ['run_id', 'step', 'attempt', 'outcome', 'message', 'external_ref'];

    public function run(): BelongsTo
    {
        return $this->belongsTo(ProvisioningRun::class, 'run_id');
    }
}
