KTV/app/Http/Requests/ReceiveRoomStatusRequest.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

38 lines
1.1 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* @OA\Schema(
* schema="ReceiveRoomStatusRequest",
* required={"hostname", "ip", "status"},
* @OA\Property(property="hostname", type="string", example=""),
* @OA\Property(property="ip", type="string", example=""),
* @OA\Property(property="cpu", type="numeric", example=""),
* @OA\Property(property="memory", type="numeric", example=""),
* @OA\Property(property="disk", type="numeric", example=""),
* @OA\Property(property="status", type="string", example=""),
* )
*/
class ReceiveRoomStatusRequest 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 [
'hostname' => 'required|string',
'ip' => 'required|string',
'cpu' => 'nullable|numeric',
'memory' => 'nullable|numeric',
'disk' => 'nullable|numeric',
'status' => 'required|string',
];
}
}