24 lines
459 B
PHP
24 lines
459 B
PHP
<?php
|
|
namespace app\common\model;
|
|
|
|
use think\Model;
|
|
|
|
class ApiKey extends Model
|
|
{
|
|
protected $name = 'api_keys';
|
|
|
|
// 自动时间戳
|
|
//protected $autoWriteTimestamp = true;
|
|
//protected $updateTime = false;
|
|
|
|
// 读取器处理JSON字段
|
|
public function getPermissionsAttr($value)
|
|
{
|
|
return json_decode($value, true);
|
|
}
|
|
|
|
public function getIpWhitelistAttr($value)
|
|
{
|
|
return json_decode($value, true);
|
|
}
|
|
} |