<?php

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


use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Addresses\DataTransferObjects\AddressObject;

class AddressValidation extends AbstractValidation
{


    /**
     * @param AddressObject $object
     * @return array
     */
    protected function data($object): array {
        return [
            'company_id' => $object->getCompanyId(),
            'street_one' => $object->getStreetOne(),
            'street_two' => $object->getStreetTwo(),
            'city' => $object->getCity(),
            'state' => $object->getState(),
            'post_code' => $object->getPostCode(),
            'country' => $object->getCountry(),
            'default' => $object->getDefault(),
            'billing' => $object->getBilling()
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array {
        return [
            'company_id' => 'required',
            'street_one' => 'required',
            'city' => 'required',
            'state' => 'required',
            'post_code' => 'required',
            'country' => 'required',
            'default' => 'required',
            'billing' => 'required'
        ];
    }

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

}