<?php

namespace Modules\Employee\Http\Requests\Employee;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Modules\Core\Enums\StatusEnum;
use Modules\Core\Traits\FailedValidation;

class CreateEmployeeLoginRequest extends FormRequest
{
    use FailedValidation;
    
    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'password' => [
                'required',
                'string',
                'min:6',
                'confirmed'
            ],

            'password_confirmation' => [
                'required',
                'string',
                'min:6'
            ],

            'status' => [
                'required',
                Rule::enum(StatusEnum::class)
            ]
        ];
    }

    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }
}
