From 6c8780e89586d80ffc4b1abefa08258c2efdf92c Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Thu, 17 Jul 2025 17:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AA=BF=E6=95=B4=20ID=20=E9=9D=9E=E5=BF=85?= =?UTF-8?q?=E8=A6=81=2020250717?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Requests/ReceiveSwitchRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/ReceiveSwitchRequest.php b/app/Http/Requests/ReceiveSwitchRequest.php index a9242b9..da002df 100644 --- a/app/Http/Requests/ReceiveSwitchRequest.php +++ b/app/Http/Requests/ReceiveSwitchRequest.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Http\FormRequest; /** * @OA\Schema( * schema="ReceiveSwitchRequest", - * required={"id","branch_id", "floor", "type", "name", "is_online", "status"}, + * required={"branch_id", "floor", "type", "name", "is_online", "status"}, * @OA\Property(property="id", type="integer", example="1"), * @OA\Property(property="branch_id", type="integer", example="1"), * @OA\Property(property="floor", type="integer", example=2), @@ -31,7 +31,7 @@ class ReceiveSwitchRequest extends ApiRequest public function rules(): array { return [ - 'id' => ['required','integer','exists:rooms,id'], + 'id' => ['nullable'], 'branch_id' => ['required','integer','exists:branches,id'], 'floor' => ['required','integer'], 'type' => ['required','in:unset,pc,svr'],