<?php

namespace app\jinqiao\model;

use fastphp\base\Model;

class User extends Model
{
    protected $table = 'user';

    //获取用户余额
    public function getUserBalance($user_id)
    {
        $user_balance = $this->getOne(['Id' => $user_id],'RestAmount');

        return $user_balance['RestAmount'];
    }
}