mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
feat(mcp): MCP 密钥管理后台(CURD 重组 Base/App,密钥仅创建时明文展示)
This commit is contained in:
@@ -4,7 +4,33 @@ namespace base\admin\model;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $title 密钥名称
|
||||
* @property string $key 密钥SHA-256哈希
|
||||
* @property string $key_prefix 密钥前缀(展示用)
|
||||
* @property int $bind_admin_id 绑定创建者ID
|
||||
* @property int $status 状态 0:禁用,1:启用
|
||||
* @property string $remark 备注
|
||||
* @property int $use_num 调用次数
|
||||
* @property int $last_use_time 最后使用时间
|
||||
* @property int $create_time 创建时间
|
||||
*/
|
||||
class SystemMcpKeyBase extends TimeModel
|
||||
{
|
||||
protected $name = 'system_mcp_key';
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public const SELECT_LIST_STATUS = ['0' => '禁用', '1' => '启用'];
|
||||
|
||||
/**
|
||||
* 创建者(后台用户).
|
||||
* 仅按需显式调用时才查询;列表页请勿用 withJoin 预载
|
||||
* (system_admin 与主表存在 id/status 等同名字段,join 会产生歧义)。
|
||||
*/
|
||||
public function bindAdmin()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\SystemAdmin', 'bind_admin_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user