Files
ulthon_admin/extend/base/admin/model/SystemMcpKeyBase.php

37 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
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');
}
}