<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

/**
 * @OA\Schema(
 *     schema="ReceiveRoomRegisterRequest",
 *     required={"branch_name", "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',
        ];
    }
}
