<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreProductRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return auth()->check();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules(): array
    {
        return [
            'article'               => 'required|string',
            'name_tz'               => 'required|string',
            'type_tz'               => 'required|string',
            'nomenclature_number'   => 'required|string',
            'sizes'                 => 'required|string',
            'manufacturer'          => 'required|string',
            'unit'                  => 'required|string',
            'type'                  => 'required|string',
            'product_price'         => 'required|numeric',
            'installation_price'    => 'required|numeric',
            'total_price'           => 'required|numeric',
            'manufacturer_name'     => 'required|string',
            'note'                  => 'required|string',
        ];
    }
}
