單機版 v.0.0.3 20250617
心跳功能少檔
This commit is contained in:
parent
e614e1c538
commit
2785991439
35
app/Http/Requests/ReceiveRoomRegisterRequest copy.php
Normal file
35
app/Http/Requests/ReceiveRoomRegisterRequest copy.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Schema(
|
||||||
|
* schema="ReceiveRoomRegisterRequest",
|
||||||
|
* required={"branch", "room_name", "email" ,"password"},
|
||||||
|
* @OA\Property(property="branch_name", type="string", example="測試"),
|
||||||
|
* @OA\Property(property="room_name", type="string", example="PC101"),
|
||||||
|
* @OA\Property(property="room_ip", type="string", example="192.168.1.1"),
|
||||||
|
* @OA\Property(property="email", type="string", example="XX@gmail.com"),
|
||||||
|
* @OA\Property(property="password", type="string", example="XXX"),
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
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_name' =>'required|string|exists:branches,name',
|
||||||
|
'room_name' => 'required|string',
|
||||||
|
'room_ip' => 'required|string',
|
||||||
|
'email' => 'required|email',
|
||||||
|
'password' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
37
app/Http/Requests/ReceiveRoomStatusDataRequest copy.php
Normal file
37
app/Http/Requests/ReceiveRoomStatusDataRequest copy.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Schema(
|
||||||
|
* schema="ReceiveRoomStatusDataRequest",
|
||||||
|
* required={"branch_name","hostname", "ip"},
|
||||||
|
* @OA\Property(property="branch_name", type="string", example="測試"),
|
||||||
|
* @OA\Property(property="hostname", type="string", example="PC101"),
|
||||||
|
* @OA\Property(property="ip", type="string", example="192.168.XX.XX"),
|
||||||
|
* @OA\Property(property="cpu", type="numeric", example="0.00"),
|
||||||
|
* @OA\Property(property="memory", type="numeric", example="25603"),
|
||||||
|
* @OA\Property(property="disk", type="numeric", example="158266.49"),
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
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 [
|
||||||
|
'branch_name' =>'required|string|exists:branches,name',
|
||||||
|
'hostname' => 'required|string',
|
||||||
|
'ip' => 'required|string',
|
||||||
|
'cpu' => 'nullable|numeric',
|
||||||
|
'memory' => 'nullable|numeric',
|
||||||
|
'disk' => 'nullable|numeric',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user