diff --git a/modules/blazing/service/user.go b/modules/blazing/service/user.go index bbdb33c8..4b8f63d7 100644 --- a/modules/blazing/service/user.go +++ b/modules/blazing/service/user.go @@ -24,10 +24,18 @@ func NewUserService(id uint32) *UserService { }, info: &cool.Service{ Model: model.NewPlayer(), + UniqueKey: map[string]string{ + "player_id": "角色名称不能重复", + }, }, - pet: &cool.Service{Model: model.NewPet()}, - item: &cool.Service{Model: model.NewPlayerBag()}, - talk: &cool.Service{Model: model.NewTalk()}, + pet: &cool.Service{Model: model.NewPet()}, + item: &cool.Service{Model: model.NewPlayerBag(), + UniqueKey: map[string]string{ + "player_id": "角色名称不能重复", + }}, + talk: &cool.Service{Model: model.NewTalk(), UniqueKey: map[string]string{ + "player_id": "角色名称不能重复", + }}, } }