KTVCentral/app/Http/Requests/SendRoomSwitchCommandRequest.php
allen.yan 7c8c3fe69b DB 滙入
User 介面 只能看資料不能做修改
Role 介面移除
Branch介面 只能看資料不能做修改
Room 介面 可操控 包廂開關台
Sqgger API 可操控API
Room 有操控異動記錄
machine_statuses 需做資料留存需留7 天
20250528
2025-05-28 09:24:03 +08:00

36 lines
1.2 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* @OA\Schema(
* schema="SendRoomSwitchCommandRequest",
* required={"branch_id", "room_name", "command"},
* @OA\Property(property="branch_id", type="integer", example="5"),
* @OA\Property(property="room_name", type="string", example="pc102"),
* @OA\Property(property="command", type="string", enum={"active", "closed", "fire", "maintenance"}, example="active"),
* @OA\Property(property="started_at", type="string", nullable=true, example="2025-05-19 09:31:00"),
* @OA\Property(property="ended_at", type="string", nullable=true, example="2025-05-19 09:31:00")
* )
*/
class SendRoomSwitchCommandRequest 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',
'room_name' => 'required|string',
'command' => 'required|string',
'started_at' => 'nullable|date_format:Y-m-d H:i:s',
'ended_at' => 'nullable|date_format:Y-m-d H:i:s',
];
}
}