管理员新增渠道channel_id和代理angent_id
This commit is contained in:
@@ -21,6 +21,8 @@ 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
|
||||
*/
|
||||
class Admin extends Model
|
||||
{
|
||||
@@ -64,4 +66,12 @@ 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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user