<?php

namespace App\Api\Resources\User;

use Illuminate\Http\Resources\Json\JsonResource;

class UserBaseResource extends JsonResource
{

    public function toArray($request): array
    {
        return [
            'user_id'  => $this->id,
            'username' => $this->username,
            'nickname' => $this->info->nickname,
            'avatar'   => $this->info->avatar ?? '',
        ];
    }

}
