<?php

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


use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;

class TransportValidation extends AbstractValidation
{


    /**
     * @param TransportObject $object
     * @return array
     */
    protected function data($object): array {
        return [
            'type' => $object->getType(),
            'courier' => $object->getCourier(),
            'tracking_number' => $object->getTrackingNumber(),
            'dispacth_date' => $object->getDispatchDate(),
            'drop_date' => $object->getDropDate(),
            'status' => $object->getStatus(),
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array {
        return [
            'type' => 'required',
            'courier' => 'required',
            'tracking_number' => 'required',
            'status' => 'required',
        ];
    }

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

}
