<?php

namespace App\Events;

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class ModelChanged
{
    use Dispatchable, SerializesModels;

    /**
     * Create a new event instance.
     *
     * @param  string  $modelClass  The fully qualified class name of the changed model.
     * @param  string  $action  The action performed (created, updated, deleted).
     */
    public function __construct(
        public string $modelClass,
        public string $action = 'updated',
    ) {}
}
