<?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 [
            'contact_reference' => $object->getReference(),
            'phone' => $object->getPhone(),
            'contact_email' => $object->getEmail(),
            'wechat_id' => $object->getWechatId()
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array 
    {
        return [
            'contact_reference' => '',
            'phone' => 'required',
            'contact_email' => '',
            'wechat_id' => ''
        ];
    }

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