移除渠道管理

This commit is contained in:
2026-03-30 14:45:09 +08:00
parent 179d67cb0e
commit d9dc31e388
24 changed files with 71 additions and 780 deletions

View File

@@ -21,13 +21,23 @@ use support\think\Db;
* @property string $password 密码密文
* @property string $salt 密码盐
* @property string $status 状态:enable=启用,disable=禁用
* @property string $agent_id 代理ID关联渠道
* @property int $channel_id 渠道ID
* @property string $agent_id 代理 IDAPI 鉴权
* @property string $agent_api_secret Agent API 密钥
*/
class Admin extends Model
{
use TimestampInteger;
/**
* 已移除的 channel_id 等若仍被旧请求/缓存传入,禁止参与读写
*/
protected function getOptions(): array
{
return [
'disuse' => ['channel_id'],
];
}
protected string $table = 'admin';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;
@@ -66,12 +76,4 @@ class Admin extends Model
{
return $this->where(['id' => $uid])->update(['password' => hash_password($newPassword), 'salt' => '']);
}
/**
* 关联渠道
*/
public function channel(): \think\model\relation\BelongsTo
{
return $this->belongsTo(\app\common\model\ChannelManage::class, 'channel_id', 'id');
}
}