<?php

namespace app\admin\model;

use think\Model;
use think\facade\Db;
/**
 * 后台用户模型
 * @package app\admin\model
 */
class Agent extends Model
{
     // 设置当前模型对应的完整数据表名称
    protected $name = 'member';

    // 自动写入时间戳
    protected $autoWriteTimestamp = true;
    
    public static function getAgentList($map=[],$order='',$offset=20)
    {
        $data_list = self::where($map)
            ->field('id,name,mobile,agent_far,agent_pro,agent_id,agent_rate,agent_time,create_time')
            ->order($order)
            ->paginate($offset, false, ['query' => request()->param()])
		    ->each( function($item, $key){
                //return self::getMarketValue($item);
            });
        return $data_list;
    }
}