<?php #CodeGenerator V4 Δ 3f90e31bd07a6e59f56dab12732cdef6 Δ DYNAMICALLY GENERATED FILE - Do not modify this line! Remove it completely to protect the file from changes.
/**
 * JSON:API Request Class
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @version     STUB: 1.0.0
 * @generated   2026-03-23 15:02:27
 * @package     bplan-base/globals
 * @subpackage  Requests
 * @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\JsonApi\Data\ImportLogs;


use BplanBase\Globals\Enums\ImportStatus;
use BplanBase\Globals\Enums\ImportTrigger;
use Illuminate\Validation\Rule;
use LaravelJsonApi\Laravel\Http\Requests\ResourceRequest;
use LaravelJsonApi\Validation\Rule as JsonApiRule;


/**
 * JSON:API Request Class
 *
 * @version     1.0.0 / 2026-03-23
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
class ImportLogRequest extends ResourceRequest
{


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


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


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


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


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


    /**
     * Get the validation rules for the resource.
     *
     * @return      array
     *
     * @version     1.0.0 / 2026-03-23
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function rules(): array
    {
        return [
            'begin'          => ['nullable', 'date'],
            'context'        => ['required', 'string', 'max:255'],
            'errors'         => [],
            'importFileName' => ['required', 'string', 'max:255'],
            'importFilePath' => ['required', 'string', 'max:1000'],
            'rowCount'       => ['required', 'integer'],
            'runtime'        => ['nullable'],
            'status'         => ['required', Rule::enum(ImportStatus::class)],
            'trigger'        => ['required', Rule::enum(ImportTrigger::class)],

            'import-user'    => JsonApiRule::toOne(),
            'tenant'         => JsonApiRule::toOne(),

        ];
    } // rules()


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


} // class ImportLogRequest extends ResourceRequest {}
