<?php

namespace App\Http\Requests;

use App\Models\CommissionData;
use Gate;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Response;

class UpdateCommissionDataRequest extends FormRequest
{
    public function authorize()
    {
        return Gate::allows('commission_data_edit');
    }

    public function rules()
    {
        return [
            'commission_id' => [
                'required',
                'integer',
            ],
            'commission_category_name_id' => [
                'required',
                'integer',
            ],
            'commission_type_id' => [
                'required',
                'integer',
            ],
            'commission_value' => [
                'string',
                'nullable',
            ],
            'commission_value_text_1' => [
                'string',
                'nullable',
            ],
            'commission_value_text_2' => [
                'string',
                'nullable',
            ],
            'commission_value_text_3' => [
                'string',
                'nullable',
            ],
        ];
    }
}
