KTV/app/Http/Requests/ReceiveRoomStatusDataRequest.php

38 lines
1.1 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* @OA\Schema(
* schema="ReceiveRoomStatusDataRequest",
* 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 ReceiveRoomStatusDataRequest 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',
];
}
}