<?php
namespace app\common\model;
class Addons extends Base
{
   
   public  function getAddonsList($where="")
   {

     $data = $this->where($where)->order('id','desc')->select();

      return $data;
   }
 //通过ID获得信息
   public function getAddonsById($id)
   {
   	 $where['id'] = $id;
     return $this->where($where)->find();
    }
//通过插件名称获得插件
  public function getAddonsCount($where){
    return $this->where($where)->count();
  }

//开启插件
 public function open($id,$status){
  $where['id'] = $id;
  $data['status'] =$status;
  return $this->where($where)->update($data);

 }

//开闭插件
 public function close($id,$status){
  $where['id'] = $id;
  $data['status'] =$status;
 return $this->where($where)->update($data);

 }
}
