<?php

namespace Modules\Linksehat\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, mixed>
     */
    public function rules()
    {
        return [
            'name_prefix' => 'string',
            'name' => 'string',
            'name_suffix' => 'string',
            'birth_place' => 'string',
            'birth_date' => 'date',
            'gender' => 'string',
            'phone' => 'numeric',
            'email' => 'email',
            'blood_type' => 'string',
            'weight' => 'string',
            'height' => 'string',
            'relation_with_owner' => 'string', // relasi family table
            'marital_status' => 'string',
            'religion' => 'string',
            'last_education' => 'string',
            'current_employment' => 'string',
            'nik' => 'string|min:16|max:16',
            'updated_by' => 'integer',
            'user_avatar' => 'file', // relasi file table
            'verification_file' => 'file', // relasi file table
            'is_ktp' => 'boolean',
            'citizenship' => 'string',
            'main_address_id' => 'numeric',
            'domicile_address_id' => 'numeric',
        ];
    }
}
