<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'name' => ['required', 'string', 'max:255', 'unique:salary_components,name'],
            'type' => ['required', 'in:earning,deduction'],
            'status' => ['required', 'in:active,inactive'],
        ];
    }
}
