<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class DeviceStoreRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'device_id' => ['required', 'string', 'max:190'],
            'device_name' => ['nullable', 'string', 'max:120'],
            'platform' => ['required', Rule::in(['ios', 'android', 'web'])],
            'provider' => ['required', Rule::in(['expo', 'fcm', 'apns'])],
            'token' => ['required', 'string', 'max:2000'],
        ];
    }
}
