調整 正規化 20250701
ReceiveRoomRegisterRequest 移除 branch_name 改為nullable ,room_name,room_ip
This commit is contained in:
parent
e4c4b2b61b
commit
b4957b99a0
@ -7,10 +7,7 @@ use Illuminate\Foundation\Http\FormRequest;
|
|||||||
/**
|
/**
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* schema="ReceiveRoomRegisterRequest",
|
* schema="ReceiveRoomRegisterRequest",
|
||||||
* required={"branch", "room_name", "email" ,"password"},
|
* required={ "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="email", type="string", example="XX@gmail.com"),
|
||||||
* @OA\Property(property="password", type="string", example="XXX"),
|
* @OA\Property(property="password", type="string", example="XXX"),
|
||||||
* )
|
* )
|
||||||
@ -25,9 +22,8 @@ class ReceiveRoomRegisterRequest extends ApiRequest
|
|||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'branch_name' =>'required|string|exists:branches,name',
|
'room_name' => 'nullable|string',
|
||||||
'room_name' => 'required|string',
|
'room_ip' => 'nullable|string',
|
||||||
'room_ip' => 'required|string',
|
|
||||||
'email' => 'required|email',
|
'email' => 'required|email',
|
||||||
'password' => 'required',
|
'password' => 'required',
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user