1
This commit is contained in:
36
app/admin/model/SystemAdmin.php
Normal file
36
app/admin/model/SystemAdmin.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
class SystemAdmin extends TimeModel
|
||||
{
|
||||
|
||||
protected function getOptions(): array
|
||||
{
|
||||
return [
|
||||
'deleteTime' => 'delete_time',
|
||||
];
|
||||
}
|
||||
|
||||
public array $notes = [
|
||||
'login_type' => [
|
||||
1 => '密码登录',
|
||||
2 => '密码 + 谷歌验证码登录'
|
||||
],
|
||||
];
|
||||
|
||||
public static function getAuthIdsAttr($value): array
|
||||
{
|
||||
if (!$value) return [];
|
||||
return explode(',', $value);
|
||||
}
|
||||
|
||||
public static function getAuthList(): array
|
||||
{
|
||||
return SystemAuth::where('status', 1)->column('title', 'id');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user