PrizeToken.php 1019 字节
<?php
namespace app\common\model\serviceapi;
use app\common\model\ServiceApi;

/**
 * 功能描述  抽奖token
 * Class token
 * @package app\common\model\commapi
 * Date: 2020/8/31
 * Time: 16:33
 * @author nyq
 */
class PrizeToken extends ServiceApi
{
    protected $table = "sos_prize_token";
    protected $pk = "id";

    /**
     * 函数功能描述  获取token
     * Date: 2020/8/31
     * Time: 16:40
     * @author nyq
     */

    public function getToken()
    {
        $user = static::find();
        return $user;
    }
    /**
     * 函数功能描述  修改token
     * Date: 2020/8/31
     * Time: 16:40
     * @author nyq
     */
    public function updataToken($where, $data) {
        $res = static::where($where)->update($data);
        return $res;
    }


    /**
     * 函数功能描述  添加token
     * Date: 2020/8/31
     * Time: 15:00
     * @author nyq
     */
    public function addToken($data)
    {
        $res = static::insert($data);
        return $res;
    }










}