<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'default_currency' => ['required', 'string', 'size:3'],
            'create_activity_on_installment' => ['sometimes', 'boolean'],
            'default_decision_id' => ['nullable', 'integer', 'exists:decisions,id'],
            'default_action_id' => ['nullable', 'integer', 'exists:actions,id'],
            'activity_note_template' => ['nullable', 'string', 'max:255'],
        ];
    }
}
