refactor(user): 重构用户服务数据库操作,将reg服务重命名为info并新增talk挖矿服务
This commit is contained in:
@@ -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()},
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user