<?php

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


use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackageObject;

class PackageValidation extends AbstractValidation
{


    /**
     * @param PackageObject $object
     * @return array
     */
    protected function data($object): array {
        return [
            'type' => $object->getType(),
            'width' => $object->getWidth(),
            'height' => $object->getHeight(),
            'length' => $object->getLength(),
            'weight' => $object->getWeight(),
            'quantity' => $object->getQuantity(),
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array {
        return [
            'type' => 'required',
            'width' =>  'required',
            'height' =>  'required',
            'length' =>  'required',
            'weight' =>  'required',
            'quantity' => 'required',
        ];
    }

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

}
