<?php
namespace App\Models;
class Settings extends BaseModel
{

    protected $table="settings";
    public $timestamps = false;
    //获取所有菜单
    function getSet(){
        $data=$this->where('id',1)->first();
        if(!$data){
            return -6010000922;//没有数据
        }
        return $data->toArray();
    }
    function updateSet($data){
        $res=$this->where('id',1)->update($data);
        if(!$res){
            return -7020050022;
        }
        return 1;
    }
}
