<?php

namespace App\Models;

/**
 *
 */
class AgentDesc extends BaseModel {

	protected $table = 'agent_described';
	public $timestamps = false;
	//获取代理描述信息
    function getDescByGrade($grade){
        $data=$this->where('grade',$grade)->first();
        if(!$data){
            return -8005445322;
        }
        return $data->toArray();
    }
    //更新描述信息
    function updateDesc($data,$grade){
        $res=$this->where('grade',$grade)->update($data);
        if(!$res){
            return -8005446322;
        }
        return 1;
    }
}

?>