<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'market_id' => ['required', 'exists:markets,id'],
            'number' => ['required', 'string', 'max:50'],
            'is_occupied' => ['boolean'],
            'merchant_id' => ['nullable', 'exists:merchants,id'],
        ];
    }
}
