migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Booking\Http\Requests\RoomBlock;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RoomBlockStoreRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'hotel_id' => 'nullable|exists:hotels,id',
|
||||
'room_id' => 'required|exists:rooms,id',
|
||||
'start_date' => 'required|date',
|
||||
'end_date' => 'required|date|after_or_equal:start_date',
|
||||
'start_time' => 'nullable|date_format:H:i:s',
|
||||
'end_time' => 'nullable|date_format:H:i:s|after:start_time',
|
||||
'block_type' => 'required|in:maintenance,deep_clean,renovation,owner_stay,event,other',
|
||||
'blocked_inventory' => 'required|integer|min:1',
|
||||
'priority' => 'integer|min:1',
|
||||
'reason' => 'nullable|string|max:255',
|
||||
'auto_release' => 'boolean',
|
||||
'created_by' => 'nullable|exists:users,id',
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Booking\Http\Requests\RoomBlock;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RoomBlockUpdateRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'hotel_id' => 'nullable|exists:hotels,id',
|
||||
'room_id' => 'required|exists:rooms,id',
|
||||
'start_date' => 'required|date',
|
||||
'end_date' => 'required|date|after_or_equal:start_date',
|
||||
'start_time' => 'nullable|date_format:H:i:s',
|
||||
'end_time' => 'nullable|date_format:H:i:s|after:start_time',
|
||||
'block_type' => 'required|in:maintenance,deep_clean,renovation,owner_stay,event,other',
|
||||
'blocked_inventory' => 'required|integer|min:1',
|
||||
'priority' => 'integer|min:1',
|
||||
'reason' => 'nullable|string|max:255',
|
||||
'auto_release' => 'boolean',
|
||||
'created_by' => 'nullable|exists:users,id',
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user