<?php

namespace App\Modules\Mini\Controllers;

use App\Base\BaseController;
use Faker\Provider\Image;

class AuthController extends BaseController
{
    public function codeToSession()
    {
        return $this->ok([
            "openid" => "openid",
            "session_key" => "session_key",
            "token" => "token",
            "name" => "",
            "phone" => "",
        ]);
    }

    public function decryptUserInfo()
    {
        return $this->ok([
            "token" => "token",
            "name" => "",
            "phone" => "",
        ]);
    }

    public function decryptPhone()
    {
        return $this->ok([
            "token" => "token",
            "name" => "",
            "phone" => "",
        ]);
    }

    public function profile()
    {
        return $this->ok([
            "id" => 1,
            "token" => "token",
            "name" => "用户名称",
            "avatar" => Image::imageUrl(),
            "company" => [
                "id" => 1,
                "name" => "公司名称",
            ],
        ]);
    }
}