钱包修改
This commit is contained in:
@@ -4,6 +4,7 @@ namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use think\model\relation\BelongsTo;
|
||||
use think\model\relation\HasMany;
|
||||
|
||||
/**
|
||||
* User 模型
|
||||
@@ -49,4 +50,9 @@ class User extends Model
|
||||
{
|
||||
return $this->where(['id' => $uid])->update(['password' => hash_password($newPassword), 'salt' => '']);
|
||||
}
|
||||
|
||||
public function userScore(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserScore::class, 'user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user