<?php

namespace App\Http\Requests\ItemMaster;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'page_id' => 'nullable|integer|exists:item_pages,id',
            'title' => 'required|string|max:255',
            'type' => 'required|in:fields,bom',
            'description' => 'nullable|string',
            'is_default' => 'nullable|boolean',
        ];
    }
}
