You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.8 KiB
53 lines
1.8 KiB
<?php
|
|
/**
|
|
* +----------------------------------------------------------------------
|
|
* | 系统设置分组模型
|
|
* +----------------------------------------------------------------------
|
|
* .::::.
|
|
* .::::::::. | AUTHOR: siyu
|
|
* ::::::::::: | EMAIL: 407593529@qq.com
|
|
* ..:::::::::::' | QQ: 407593529
|
|
* '::::::::::::' | DATETIME: 2019/05/15
|
|
* .::::::::::
|
|
* '::::::::::::::..
|
|
* ..::::::::::::.
|
|
* ``::::::::::::::::
|
|
* ::::``:::::::::' .:::.
|
|
* ::::' ':::::' .::::::::.
|
|
* .::::' :::: .:::::::'::::.
|
|
* .:::' ::::: .:::::::::' ':::::.
|
|
* .::' :::::.:::::::::' ':::::.
|
|
* .::' ::::::::::::::' ``::::.
|
|
* ...::: ::::::::::::' ``::.
|
|
* ```` ':. ':::::::::' ::::..
|
|
* '.:::::' ':'````..
|
|
* +----------------------------------------------------------------------
|
|
*/
|
|
namespace app\common\model;
|
|
|
|
use think\facade\Request;
|
|
|
|
class SystemGroup extends Base
|
|
{
|
|
// 定义时间戳字段名
|
|
protected $createTime = 'create_time';
|
|
protected $updateTime = 'update_time';
|
|
|
|
// 一对多获取系统设置
|
|
public function systems()
|
|
{
|
|
return $this->hasMany('System', 'group_id');
|
|
}
|
|
|
|
// 获取列表
|
|
public static function getList($where = array(), $pageSize, $order = ['sort', 'id'=>'desc']){
|
|
$list = self::where($where)
|
|
->order($order)
|
|
->paginate([
|
|
'query' => Request::get(),
|
|
'list_rows' => $pageSize,
|
|
]);
|
|
return $list;
|
|
}
|
|
|
|
}
|