mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-21 10:07:11 +00:00
43 lines
751 B
PHP
43 lines
751 B
PHP
<?php
|
|
/**
|
|
* @author: xaboy<365615158@qq.com>
|
|
* @day: 2017/11/13
|
|
*/
|
|
|
|
namespace app\admin\model\system;
|
|
|
|
use crmeb\traits\ModelTrait;
|
|
use crmeb\basic\BaseModel;
|
|
|
|
/**
|
|
* 数据组model
|
|
* Class SystemGroup
|
|
* @package app\admin\model\system
|
|
*/
|
|
class SystemGroup extends BaseModel
|
|
{
|
|
|
|
/**
|
|
* 数据表主键
|
|
* @var string
|
|
*/
|
|
protected $pk = 'id';
|
|
|
|
/**
|
|
* 模型名称
|
|
* @var string
|
|
*/
|
|
protected $name = 'system_group';
|
|
|
|
use ModelTrait;
|
|
|
|
/**
|
|
* 根据id获取当前记录中的fields值
|
|
* @param $id
|
|
* @return array
|
|
*/
|
|
public static function getField($id){
|
|
$fields = json_decode(self::where('id',$id)->value("fields"),true)?:[];
|
|
return compact('fields');
|
|
}
|
|
} |