<?php

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

use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Bookings\DataTransferObjects\BookingObject;

class BookingValidation extends AbstractValidation
{
    /**
     * @param BookingObject $object
     * @return array
     */
    protected function data($object): array 
    {
        return [
            'service_id' => $object->getServiceId(),
            'transferable_bank_id' => $object->getTransferableBankId(),
            'marking' => $object->getMarking(),
            'fix_amount' => $object->getFixAmount(),
            'fix_currency_id' => $object->getFixCurrencyId(),
            'convertible_currency_id' => $object->getConvertibleCurrencyId(),
            'conversion_currency_id' => $object->getConversionCurrencyId(),
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array 
    {
        return [
            'service_id' => 'required',
            'transferable_bank_id' => 'required',
            'marking' => 'required',
            'fix_amount' => 'required',
            'fix_currency_id' => 'required',
            'convertible_currency_id' => 'required',
            'conversion_currency_id' => 'required'
        ];
    }

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