<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'employee_id' => ['required', 'exists:users,id'],
            'payroll_structure_id' => ['required', 'exists:payroll_structures,id'],
            'salary_type' => ['required', 'in:monthly,yearly'],
            'gross_salary' => ['required', 'numeric', 'min:1'],
            'effective_from' => ['required', 'date'],
        ];
    }
}
