KTV/app/Http/Requests/ReceiveRoomRegisterRequest.php
allen.yan ae5ed4aa1f Swagger 都改到ApiResponse 輸出
Swagger Room加入TcpSocketClient
Swagger room 加入 設備註冊,設備開關
Swagger room 有異動需要寫記錄
20250519
2025-05-19 16:08:35 +08:00

32 lines
891 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* @OA\Schema(
* schema="ReceiveRoomRegisterRequest",
* required={"branch_id", "room_id", "ip"},
* @OA\Property(property="branch_id", type="integer", example="5"),
* @OA\Property(property="room_name", type="string", example="pc102"),
* @OA\Property(property="room_ip", type="string", example="192.168.x.x"),
* )
*/
class ReceiveRoomRegisterRequest extends ApiRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'branch_id' => 'required|integer|exists:branches,id',
'room_name' => 'required|string',
'room_ip' => 'nullable|ip',
];
}
}