<?php #CodeGenerator V3 Δ 5b989c3943912d9c99bc29d4cf7eb406 Δ DYNAMICALLY GENERATED FILE - Do not modify this line! Remove it completely to protect the file from changes.
/**
 * Form Request Class
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @version     STUB: 1.0.0
 * @generated   2026-05-27 10:03:41
 * @package     bplan-base/globals
 * @subpackage  FormRequests
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025, 2026 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */

namespace BplanBase\Globals\Http\Requests;


use BplanBase\Globals\Traits\FormRequestKeyPrefix;
use Illuminate\Foundation\Http\FormRequest;


/**
 * Form Request Class
 *
 * @version     1.0.0 / 2026-05-27
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
class StoreIndividualRequest extends FormRequest
{


/* +++ TRAITS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


    use FormRequestKeyPrefix;


/* +++ CLASS CONSTANTS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT MEMBERS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


    /**
     * @var     null|string $_prefix
     */
    protected null|string $_prefix;


/* +++ CLASS MEMBERS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT METHODS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


    /**
     * Determine if the user is authorized to make this request.
     *
     * @return      bool
     *
     * @version     1.0.0 / 2026-05-27
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function authorize(): bool
    {
        return true;

    } // authorize()


    /**
     * Get the validation rules that apply to the request
     *
     * @return      array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     *
     * @version     1.0.0 / 2026-05-27
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function rules(): array
    {
        $rules = [
            'active'                           => ['sometimes', 'required', 'boolean'],
            'company'                          => ['nullable', 'string', 'max:30'],
            'contact'                          => ['nullable', 'boolean'],
            'contact_group'                    => ['nullable', 'string', 'max:30'],
            'cost_center'                      => ['nullable', 'string', 'max:30'],
            'date_of_birth'                    => ['nullable'],
            'date_of_entry'                    => ['nullable'],
            'department'                       => ['nullable', 'string', 'max:50'],
            'email'                            => ['nullable', 'email', 'max:255'],
            'emergency_contact'                => ['sometimes', 'required', 'boolean'],
            'entity_type_id'                   => ['required', 'integer'],
            'first_name'                       => ['nullable', 'string', 'max:50'],
            'form_of_address'                  => ['nullable', 'string', 'max:10'],
            'function'                         => ['nullable', 'string', 'max:50'],
            'gender'                           => ['nullable', 'string', 'max:30'],
            'global_contact'                   => ['sometimes', 'required', 'boolean'],
            'id_number'                        => ['nullable', 'string', 'max:36'],
            'job_title'                        => ['nullable', 'string', 'max:30'],
            'last_name'                        => ['nullable', 'string', 'max:50'],
            'mobile_phone_number'              => ['nullable', 'string', 'max:20'],
            'mobile_phone_number_country_code' => ['nullable', 'string', 'max:4'],
            'mobile_phone_number_full'         => ['nullable', 'string', 'max:25'],
            'organizational_unit'              => ['nullable', 'string', 'max:30'],
            'personnel_number'                 => ['nullable', 'numeric', 'max:30'],
            'phone_number'                     => ['nullable', 'string', 'max:20'],
            'phone_number_country_code'        => ['nullable', 'string', 'max:4'],
            'phone_number_full'                => ['nullable', 'string', 'max:25'],

        ];
        if ($this->_prefix === null) {
            return $rules;
        }
        return $this->_prependValidationRuleKeys($rules, $this->_prefix);

    } // rules()


/* +++ CLASS METHODS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


    /**
     * Get the validation rules that apply to the request
     *
     * @param       int|string $id
     *
     * @param       null|string $prefix
     *
     * @return      array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     *
     * @version     1.0.0 / 2026-05-27
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public static function getRules(null|string $prefix = null): array
    {
        $Instance = new static();

        $Instance->_prefix = $prefix;

        return $Instance->rules();

    } // getRules()


} // class StoreIndividualRequest extends FormRequest {}
