mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
41 lines
900 B
PHP
41 lines
900 B
PHP
<?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 [];
|
|
}
|
|
} |