KTV/app/Http/Requests/SendRoomSwitchCommandRequest.php
allen.yan 3bbb1a5cc0 Room 加入 is_online 來區別再不再線上
調整 FavoriteSongs 資料塞值改用seeder
加入 user_song table
/api/room/receiveRegister 調整邏輯
room介面 開關包帳功能調整
寫入心跳封包
20250522
2025-05-22 10:08:34 +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',
];
}
}