<?php

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


use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Segments\DataTransferObjects\ConstantObject;

class ConstantValidation extends AbstractValidation
{
    /**
     * @param ConstantObject $object
     * @return array
     */
    protected function data($object): array {

        $data = [
            'reference' => $object->getReference(),
            'value' => $object->getValue()
        ];

        return $data;
    }

    /**
     * @return array
     */
    protected function rules(): array {
        return [
            'reference' => 'required',
            'value' => 'required'
        ];
    }

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

}