Merge pull request 'SafetyTarget' (#42) from zhangwei into dev
Reviewed-on: #42
This commit is contained in:
commit
2614965e2a
108
app/adminapi/controller/safety/SafetyTargetController.php
Normal file
108
app/adminapi/controller/safety/SafetyTargetController.php
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||||
|
// | 开源版本可自由商用,可去除界面版权logo
|
||||||
|
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||||
|
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||||
|
// | 访问官网:https://www.likeadmin.cn
|
||||||
|
// | likeadmin团队 版权所有 拥有最终解释权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | author: likeadminTeam
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
namespace app\adminapi\controller\safety;
|
||||||
|
|
||||||
|
|
||||||
|
use app\adminapi\controller\BaseAdminController;
|
||||||
|
use app\adminapi\lists\safety\SafetyTargetLists;
|
||||||
|
use app\adminapi\logic\safety\SafetyTargetLogic;
|
||||||
|
use app\adminapi\validate\safety\SafetyTargetValidate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全目标控制器
|
||||||
|
* Class SafetyTargetController
|
||||||
|
* @package app\adminapi\controller\safety
|
||||||
|
*/
|
||||||
|
class SafetyTargetController extends BaseAdminController
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取安全目标列表
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function lists()
|
||||||
|
{
|
||||||
|
return $this->dataLists(new SafetyTargetLists());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 添加安全目标
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function add()
|
||||||
|
{
|
||||||
|
$params = (new SafetyTargetValidate())->post()->goCheck('add');
|
||||||
|
$result = SafetyTargetLogic::add($params,$this->adminId);
|
||||||
|
if (true === $result) {
|
||||||
|
return $this->success('添加成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
return $this->fail(SafetyTargetLogic::getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 编辑安全目标
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function edit()
|
||||||
|
{
|
||||||
|
$params = (new SafetyTargetValidate())->post()->goCheck('edit');
|
||||||
|
$result = SafetyTargetLogic::edit($params,$this->adminId);
|
||||||
|
if (true === $result) {
|
||||||
|
return $this->success('编辑成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
return $this->fail(SafetyTargetLogic::getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 删除安全目标
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function delete()
|
||||||
|
{
|
||||||
|
$params = (new SafetyTargetValidate())->post()->goCheck('delete');
|
||||||
|
SafetyTargetLogic::delete($params);
|
||||||
|
return $this->success('删除成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取安全目标详情
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function detail()
|
||||||
|
{
|
||||||
|
$params = (new SafetyTargetValidate())->goCheck('detail');
|
||||||
|
$result = SafetyTargetLogic::detail($params);
|
||||||
|
return $this->data($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
89
app/adminapi/lists/safety/SafetyTargetLists.php
Normal file
89
app/adminapi/lists/safety/SafetyTargetLists.php
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||||
|
// | 开源版本可自由商用,可去除界面版权logo
|
||||||
|
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||||
|
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||||
|
// | 访问官网:https://www.likeadmin.cn
|
||||||
|
// | likeadmin团队 版权所有 拥有最终解释权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | author: likeadminTeam
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace app\adminapi\lists\safety;
|
||||||
|
|
||||||
|
|
||||||
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\model\dept\Dept;
|
||||||
|
use app\common\model\dept\Orgs;
|
||||||
|
use app\common\model\project\Project;
|
||||||
|
use app\common\model\safety\SafetyTarget;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全目标列表
|
||||||
|
* Class SafetyTargetLists
|
||||||
|
* @package app\adminapi\listssafety
|
||||||
|
*/
|
||||||
|
class SafetyTargetLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 设置搜索条件
|
||||||
|
* @return \string[][]
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function setSearch(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'%like%' => ['project_type', 'target'],
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取安全目标列表
|
||||||
|
* @return array
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function lists(): array
|
||||||
|
{
|
||||||
|
return SafetyTarget::where($this->searchWhere)
|
||||||
|
->field(['id', 'org_id', 'dept_id', 'project_id', 'project_type', 'target', 'require', 'target_standard', 'pass_rate', 'deviation', 'file'])
|
||||||
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
|
->order(['id' => 'desc'])
|
||||||
|
->select()->each(function($item){
|
||||||
|
$project = Project::field('name')->where('id',$item['project_id'])->findOrEmpty();
|
||||||
|
$org = Orgs::field('name')->where('id',$item['org_id'])->findOrEmpty();
|
||||||
|
$dept = Dept::field('name')->where('id',$item['dept_id'])->findOrEmpty();
|
||||||
|
$item['org_name'] = $org['name'];
|
||||||
|
$item['dept_name'] = $dept['name'];
|
||||||
|
$item['project_name'] = $project['name'];
|
||||||
|
return $item;
|
||||||
|
})
|
||||||
|
->toArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取安全目标数量
|
||||||
|
* @return int
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function count(): int
|
||||||
|
{
|
||||||
|
return SafetyTarget::where($this->searchWhere)->count();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
140
app/adminapi/logic/safety/SafetyTargetLogic.php
Normal file
140
app/adminapi/logic/safety/SafetyTargetLogic.php
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||||
|
// | 开源版本可自由商用,可去除界面版权logo
|
||||||
|
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||||
|
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||||
|
// | 访问官网:https://www.likeadmin.cn
|
||||||
|
// | likeadmin团队 版权所有 拥有最终解释权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | author: likeadminTeam
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace app\adminapi\logic\safety;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
|
use app\common\model\dept\Dept;
|
||||||
|
use app\common\model\dept\Orgs;
|
||||||
|
use app\common\model\project\Project;
|
||||||
|
use app\common\model\safety\SafetyTarget;
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全目标逻辑
|
||||||
|
* Class SafetyTargetLogic
|
||||||
|
* @package app\adminapi\logic\safety
|
||||||
|
*/
|
||||||
|
class SafetyTargetLogic extends BaseLogic
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 添加安全目标
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public static function add(array $params,$admin_id): bool
|
||||||
|
{
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
SafetyTarget::create([
|
||||||
|
'org_id' => $params['org_id'],
|
||||||
|
'dept_id' => $params['dept_id'],
|
||||||
|
'project_id' => $params['project_id'],
|
||||||
|
'project_type' => $params['project_type'],
|
||||||
|
'target' => $params['target'],
|
||||||
|
'require' => $params['require'],
|
||||||
|
'target_standard' => $params['target_standard'],
|
||||||
|
'pass_rate' => $params['pass_rate'],
|
||||||
|
'deviation' => $params['deviation'],
|
||||||
|
'file' => !empty($params['file']) ? $params['file'] : null,
|
||||||
|
'add_user' => $admin_id,
|
||||||
|
'update_user' => $admin_id,
|
||||||
|
]);
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
self::setError($e->getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 编辑安全目标
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public static function edit(array $params,$admin_id): bool
|
||||||
|
{
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
SafetyTarget::where('id', $params['id'])->update([
|
||||||
|
'org_id' => $params['org_id'],
|
||||||
|
'dept_id' => $params['dept_id'],
|
||||||
|
'project_id' => $params['project_id'],
|
||||||
|
'project_type' => $params['project_type'],
|
||||||
|
'target' => $params['target'],
|
||||||
|
'require' => $params['require'],
|
||||||
|
'target_standard' => $params['target_standard'],
|
||||||
|
'pass_rate' => $params['pass_rate'],
|
||||||
|
'deviation' => $params['deviation'],
|
||||||
|
'file' => !empty($params['file']) ? $params['file'] : null,
|
||||||
|
'update_user' => $admin_id,
|
||||||
|
'update_time' => time()
|
||||||
|
]);
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
self::setError($e->getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 删除安全目标
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public static function delete(array $params): bool
|
||||||
|
{
|
||||||
|
return SafetyTarget::destroy($params['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取安全目标详情
|
||||||
|
* @param $params
|
||||||
|
* @return array
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public static function detail($params): array
|
||||||
|
{
|
||||||
|
$data = SafetyTarget::field(['id','org_id','dept_id','project_id','project_type','target','require','target_standard','pass_rate','deviation','file','add_user','update_user','create_time','update_time'])->findOrEmpty($params['id'])->toArray();
|
||||||
|
$project = Project::field('name')->where('id',$data['project_id'])->findOrEmpty();
|
||||||
|
$org = Orgs::field('name')->where('id',$data['org_id'])->findOrEmpty();
|
||||||
|
$dept = Dept::field('name')->where('id',$data['dept_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id','in',[$data['add_user'],$data['update_user']])->column('name','id');
|
||||||
|
$data['org_name'] = $org['name'];
|
||||||
|
$data['dept_name'] = $dept['name'];
|
||||||
|
$data['project_name'] = $project['name'];
|
||||||
|
$data['add_user_name'] = $admin[$data['add_user']];
|
||||||
|
$data['update_user_name'] = $admin[$data['update_user']];
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
155
app/adminapi/validate/safety/SafetyTargetValidate.php
Normal file
155
app/adminapi/validate/safety/SafetyTargetValidate.php
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||||
|
// | 开源版本可自由商用,可去除界面版权logo
|
||||||
|
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||||
|
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||||
|
// | 访问官网:https://www.likeadmin.cn
|
||||||
|
// | likeadmin团队 版权所有 拥有最终解释权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | author: likeadminTeam
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace app\adminapi\validate\safety;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\dept\Dept;
|
||||||
|
use app\common\model\dept\Orgs;
|
||||||
|
use app\common\model\project\Project;
|
||||||
|
use app\common\validate\BaseValidate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全目标验证器
|
||||||
|
* Class SafetyTargetValidate
|
||||||
|
* @package app\adminapi\validate\safety
|
||||||
|
*/
|
||||||
|
class SafetyTargetValidate extends BaseValidate
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置校验规则
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
protected $rule = [
|
||||||
|
'id' => 'require',
|
||||||
|
'org_id' => 'require|checkOrg',
|
||||||
|
'dept_id' => 'require|checkDept',
|
||||||
|
'project_id' => 'require|checkProject',
|
||||||
|
'file' => 'checkFile'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $message = [
|
||||||
|
'id.require' => '缺少必要参数',
|
||||||
|
'org_id.require' => '请选择组织',
|
||||||
|
'dept_id.require' => '请选择部门',
|
||||||
|
'project_id.require' => '请选择项目',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数描述
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
protected $field = [
|
||||||
|
'id' => 'id',
|
||||||
|
'org_id' => '组织id',
|
||||||
|
'dept_id' => '部门id',
|
||||||
|
'project_id' => '项目id',
|
||||||
|
'target' => '安全目标',
|
||||||
|
'add_user' => '创建人',
|
||||||
|
'update_user' => '更新人',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 添加场景
|
||||||
|
* @return SafetyTargetValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function sceneAdd()
|
||||||
|
{
|
||||||
|
return $this->only(['org_id','dept_id','project_id','project_type','target','require','target_standard','pass_rate','deviation','file']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 编辑场景
|
||||||
|
* @return SafetyTargetValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function sceneEdit()
|
||||||
|
{
|
||||||
|
return $this->only(['id','org_id','dept_id','project_id','project_type','target','require','target_standard','pass_rate','deviation','file']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 删除场景
|
||||||
|
* @return SafetyTargetValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function sceneDelete()
|
||||||
|
{
|
||||||
|
return $this->only(['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 详情场景
|
||||||
|
* @return SafetyTargetValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2023/12/19 11:20
|
||||||
|
*/
|
||||||
|
public function sceneDetail()
|
||||||
|
{
|
||||||
|
return $this->only(['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkOrg($value): bool|string
|
||||||
|
{
|
||||||
|
$data = Orgs::where('id',$value)->findOrEmpty();
|
||||||
|
if($data->isEmpty()){
|
||||||
|
return '组织不存在';
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkDept($value,$rule,$data): bool|string
|
||||||
|
{
|
||||||
|
$dept = Dept::where('id',$value)->findOrEmpty();
|
||||||
|
if($dept->isEmpty()){
|
||||||
|
return '部门不存在';
|
||||||
|
}
|
||||||
|
if($dept['org_id'] != $data['org_id']){
|
||||||
|
return '部门不属于当前选择的组织';
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkProject($value): bool|string
|
||||||
|
{
|
||||||
|
$data = Project::where('id',$value)->findOrEmpty();
|
||||||
|
if($data->isEmpty()){
|
||||||
|
return '项目不存在';
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkFile($value): bool|string
|
||||||
|
{
|
||||||
|
if($value != ''){
|
||||||
|
$file = json_decode($value,true);
|
||||||
|
if(empty($file)){
|
||||||
|
return '附件必须是json数组';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
37
app/common/model/safety/SafetyTarget.php
Normal file
37
app/common/model/safety/SafetyTarget.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||||
|
// | 开源版本可自由商用,可去除界面版权logo
|
||||||
|
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||||
|
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||||
|
// | 访问官网:https://www.likeadmin.cn
|
||||||
|
// | likeadmin团队 版权所有 拥有最终解释权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | author: likeadminTeam
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace app\common\model\safety;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\BaseModel;
|
||||||
|
use think\model\concern\SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全目标模型
|
||||||
|
* Class SafetyTarget
|
||||||
|
* @package app\common\model\safety
|
||||||
|
*/
|
||||||
|
class SafetyTarget extends BaseModel
|
||||||
|
{
|
||||||
|
use SoftDelete;
|
||||||
|
protected $name = 'safety_target';
|
||||||
|
protected $deleteTime = 'delete_time';
|
||||||
|
|
||||||
|
public function getFileAttr($value)
|
||||||
|
{
|
||||||
|
return json_decode($value,true);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user