<?php

namespace App\Domains\Auth\Resources;

use App\Domains\Auth\Models\User;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

/**
 * @mixin User
 */
class UserResource extends JsonResource
{
    /**
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'nombre_apellido' => $this->nombre_apellido,
            'email' => $this->email,
            'dni' => $this->dni,
            'telefono' => $this->telefono,
            'rol_codigo' => $this->rol_codigo,
            'tenant_codigo' => $this->tenant_codigo,
        ];
    }
}
