2025-05-19 16:08:35 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @OA\Schema(
|
|
|
|
* schema="ReceiveRoomRegisterRequest",
|
2025-05-22 15:35:02 +08:00
|
|
|
* required={"branch_name", "room_name", "email" ,"password"},
|
|
|
|
* @OA\Property(property="branch_name", type="string", example="測試"),
|
|
|
|
* @OA\Property(property="room_name", type="string", example="PC101"),
|
2025-05-22 12:21:31 +08:00
|
|
|
* @OA\Property(property="room_ip", type="string", example="192.168.1.1"),
|
2025-05-22 10:08:34 +08:00
|
|
|
* @OA\Property(property="email", type="string", example="XX@gmail.com"),
|
|
|
|
* @OA\Property(property="password", type="string", example="XXX"),
|
2025-05-19 16:08:35 +08:00
|
|
|
* )
|
|
|
|
*/
|
|
|
|
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 [
|
2025-05-22 15:25:12 +08:00
|
|
|
'branch_name' => 'required|string|exists:branches,name',
|
2025-05-19 16:08:35 +08:00
|
|
|
'room_name' => 'required|string',
|
2025-05-22 12:21:31 +08:00
|
|
|
'room_ip' => 'required|string',
|
2025-05-22 10:08:34 +08:00
|
|
|
'email' => 'required|email',
|
|
|
|
'password' => 'required',
|
2025-05-19 16:08:35 +08:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|