```
feat(regional_agent): 完善代理佣金配置逻辑和状态管理
这个提交包含在:
@@ -11,6 +11,20 @@ class Agent extends Model
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
|
||||
const STATUS_NORMAL = 'normal';
|
||||
const STATUS_PENDING = 'pending';
|
||||
const STATUS_FORBIDDEN = 'forbidden';
|
||||
|
||||
public function scopeNormal($query)
|
||||
{
|
||||
return $query->where('status', self::STATUS_NORMAL);
|
||||
}
|
||||
|
||||
public function scopeAvailable($query)
|
||||
{
|
||||
return $query->where('status', 'in', [self::STATUS_NORMAL]);
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(\app\admin\model\shopro\user\User::class, 'user_id', 'id');
|
||||
|
||||
在新工单中引用
屏蔽一个用户