<?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 = [
            'name' => $object->getName(),
            'reference' => $object->getReference(),
            'detail' => $object->getDetail()
        ];

        return $data;
    }

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

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

}