<?php

namespace App\Classes\Modules\Orders\Standards\Validators;

use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Orders\DataTransferObjects\OrderObject;

class UpdateCurrentStepValidation extends AbstractValidation
{
    /**
     * @param OrderObject $object
     * @return array
     */
    protected function data($object): array
    {
        return [
            'id' => $object->getId(),
            'current_step' => $object->getCurrentStep(),
        ];
    }

    /**
     * @param string $type
     * @return array
     */
    protected function rules(?string $type = 'POST'): array
    {
        return [
            'id'=> 'required|numeric',
            'current_step'=> 'required',
        ];
    }

    /**
     * @return array
     */
    protected function messages(): array
    {
        return [];
    }
}
