mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
36 lines
542 B
PHP
36 lines
542 B
PHP
<?php
|
|
|
|
namespace app\model;
|
|
|
|
use think\Model;
|
|
|
|
/**
|
|
* 权限表
|
|
* @mixin think\Model
|
|
*/
|
|
class AdminPermission extends Model
|
|
{
|
|
//
|
|
|
|
public function getIsLogAttr($value)
|
|
{
|
|
$status = [
|
|
0=>'不记录',
|
|
1=>'记录',
|
|
];
|
|
|
|
return $status[intval($value)];
|
|
}
|
|
|
|
public function getNameAttr($value)
|
|
{
|
|
if(empty($value)){
|
|
$value = $this->getData('app').'/'.$this->getData('controller').'/'.$this->getData('action');
|
|
}
|
|
|
|
return $value;
|
|
}
|
|
|
|
|
|
}
|