<?php

namespace App\Http\Requests\V3\Harim\Divarkeshi;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\ValidationRule;

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

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'dabirkhaneh_number' => 'required',
            'nameh_date' => 'required',
            'nameh_date_fa' => 'required',
            'marjae_pasokh' => 'string',
            'motaghazi_is_legal_id' => 'required',
            'motaghazi_is_legal' => 'required',
            'motaghazi_type_id' => 'integer',
            'motaghazi_type' => 'string',
            'motaghazi_firstname' => 'required',
            'motaghazi_lastname' => 'required',

            /// conditional rule
            'national_id' => 'numeric',
            'shenase_melli' => 'numeric',
            ///

            'tel_number' => 'numeric',
            'mobile_number' => 'numeric',
            'address' => 'required',
            'edare_kol_id' => 'required',
            'edare_kol' => 'required',
            'edare_shahri_id' => 'required',
            'edare_shahri' => 'required',
            'rah_type_id' => 'required',
            'rah_type' => 'required',
            'name_mehvar_id' => 'integer',
            'name_mehvar_fa' => 'required',
            'mizan_harim' => 'required',
            'arze_navar' => 'string',
            'samt_id' => 'required',
            'samt' => 'required',
            'kilometr' => 'required',
            'lat' => 'required',
            'lon' => 'required',
            'zone' => 'required',
            'karbari_type_id' => 'required',
            'karbari_type' => 'required',
            'tarh_title' => 'required',
            'masahat_zirbana' => '',
            'ehdasat_type_id' => 'required',
            'ehdasat_type' => 'required',
            'divarkeshi_distance' => '',
            'mostahadesat_distance' => '',
            'mahale_ejra_id' => '',
            'mahale_ejra' => '',
            'traffic_id' => 'required',
            'traffic' => 'required',
            'vaziat_eghtesadi_id' => '',
            'vaziat_eghtesadi' => '',
            'has_access_id' => 'required',
            'has_access' => 'required',
            'shomare_estelam_harim' => '',
            'max_month' => 'required',
            'max_day' => 'required',
            'shomare_tahaodname' => '',
            'shomare_daftarkhaneh' => '',
            'description' => '',
            'ronevesht' => '',
        ];
    }
}
