調整 ID 非必要 20250717

This commit is contained in:
allen.yan 2025-07-17 17:26:00 +08:00
parent 03e890bdf0
commit 6c8780e895

View File

@ -7,7 +7,7 @@ use Illuminate\Foundation\Http\FormRequest;
/** /**
* @OA\Schema( * @OA\Schema(
* schema="ReceiveSwitchRequest", * 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="id", type="integer", example="1"),
* @OA\Property(property="branch_id", type="integer", example="1"), * @OA\Property(property="branch_id", type="integer", example="1"),
* @OA\Property(property="floor", type="integer", example=2), * @OA\Property(property="floor", type="integer", example=2),
@ -31,7 +31,7 @@ class ReceiveSwitchRequest extends ApiRequest
public function rules(): array public function rules(): array
{ {
return [ return [
'id' => ['required','integer','exists:rooms,id'], 'id' => ['nullable'],
'branch_id' => ['required','integer','exists:branches,id'], 'branch_id' => ['required','integer','exists:branches,id'],
'floor' => ['required','integer'], 'floor' => ['required','integer'],
'type' => ['required','in:unset,pc,svr'], 'type' => ['required','in:unset,pc,svr'],