<?php

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


use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;

class ContactValidation extends AbstractValidation
{


    /**
     * @param ContactObject $object
     * @return array
     */
    protected function data($object): array {
        return [
            'company_id' => $object->getCompanyId(),
            'name' => $object->getName(),
            'designation' => $object->getDesignation(),
            'email' => $object->getEmail(),
            'phone' => $object->getPhone(),
            'wechat_id' => $object->getWechatId()
        ];
    }

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

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

}