钱包修改

This commit is contained in:
2026-04-17 11:53:19 +08:00
parent 7f3a7c34f0
commit ad74accfcc
10 changed files with 136 additions and 24 deletions

View File

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