<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-present http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\admin\model;

use app\admin\logic\PluginLogic;
use app\admin\service\PluginService;
use think\Model;

class PluginModel extends Model
{

    /**
     * 模型名称
     * @var string
     */
    protected $name = 'plugin';

    protected $type = [
        'config' => 'array'
    ];

    /**
     * 获取插件列表
     * @deprecated
     */
    public function getList()
    {
        return PluginService::getList();
    }

    /**
     * @param $refresh
     * @return array
     * @deprecated
     */
    public function getHooks($refresh = false)
    {
        return PluginService::getHooks($refresh);
    }

    /**
     * @param $id
     * @return bool|int
     * @deprecated
     */
    public function uninstall($id)
    {
        return PluginService::uninstall($id);
    }

}
