<?php

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;
use \App\Models;

/**
 * 代理管理模型类
 */
class AgentCash extends Model
{


    /**
     * 查询游戏余额
     *
     * @access public
     * @return array
     */
    public function seeGameMoney()
    {
        $gameMoneyModel = new Models\GameMoney;
        $gameMoneySelect = [
            'gname',
            'gameMoney_money',
        ];
        $gameMoneyWhere = [
            'members_id' => S('token_user_id'),
        ];
        $result = $gameMoneyModel
            ->join('gmenu', 'gameMoney.gmenu_id', 'gmenu.id')
            ->select($gameMoneySelect)
            ->where($gameMoneyWhere)
            ->get();

        return $result;

    }//end seeGameMoney()


}
