<?php

namespace App\Services\WeChat;

use App\Models\Common\TokenModel;

class Base
{

    protected $publicId;

    protected $appId;

    protected $appSecret;

    protected $accessToken;

    protected $nickname;


    public function __construct($publicId)
    {
        $media = TokenModel::where('user_name', $publicId)->first();
        $this->publicId = $media->user_name;
        $this->appId = $media->appId;
        $this->appSecret = $media->app_secret;
        $this->accessToken = $media->access_token;
        $this->nickname = $media->nick_name;
    }
}
