refactor(user): 重构用户服务数据库操作,将reg服务重命名为info并新增talk挖矿服务

This commit is contained in:
1
2025-09-22 17:22:08 +00:00
parent 8b06b9a794
commit 31b82f7698
7 changed files with 146 additions and 14 deletions

View File

@@ -7,11 +7,11 @@ import (
type UserService struct {
userid uint32
task *cool.Service //任务
reg *cool.Service //注册
pet *cool.Service //精灵
item *cool.Service //物品
talk *cool.Service //挖矿
task *cool.Service //任务
info *cool.Service //信息
pet *cool.Service //精灵
item *cool.Service //物品
}
func NewUserService(id uint32) *UserService {
@@ -20,11 +20,12 @@ func NewUserService(id uint32) *UserService {
task: &cool.Service{
Model: model.NewTask(),
},
reg: &cool.Service{
info: &cool.Service{
Model: model.NewPlayer(),
},
pet: &cool.Service{Model: model.NewPet()},
item: &cool.Service{Model: model.NewPlayerBag()},
talk: &cool.Service{Model: model.NewTalk()},
}
}