<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class RegisterClientRequest extends FormRequest
{
  public function rules(): array
  {
    return [
      'email'         => 'sometimes|email|nullable',
      'phone'         => 'sometimes|string|nullable',
      'name'          => 'sometimes|string|max:255|nullable',
      'code'          => 'required|string|max:6',
      'document'      => 'sometimes|string|nullable',
      'zip_code'      => 'sometimes|string|max:20|nullable',
      'address'       => 'sometimes|string|max:255|nullable',
      'number'        => 'sometimes|string|max:20|nullable',
      'district'      => 'sometimes|string|max:255|nullable',
      'complement'    => 'sometimes|string|max:255|nullable',
      'has_complement' => 'sometimes|boolean|nullable',
      'nickname'      => 'sometimes|string|max:255|nullable',
      'instructions'  => 'sometimes|string|max:500|nullable',
      'address_type'  => 'sometimes|string|in:home,commercial,other|nullable',
      'city'          => 'sometimes|string|max:255|nullable',
      'state'         => 'sometimes|string|max:10|nullable',
      'latitude'      => 'sometimes|numeric|nullable',
      'longitude'     => 'sometimes|numeric|nullable',
    ];
  }
}
