<?php

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

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

class BookingMergeValidation extends AbstractValidation
{
    /**
     * @param BookingMergeObject $object
     * @return array
     */
    protected function data($object): array 
    {
        return [
            'id' => $object->getId(),
            'booking_ids' => $object->getBookingIds()
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array 
    {
        return [
            'id' => 'required|integer',
            'booking_ids' => 'required|array|min:1',
        ];
    }

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