feat:完善信息

This commit is contained in:
henry
2021-10-15 15:06:02 +08:00
parent af8691e943
commit ae9fb8ea0f
86 changed files with 215 additions and 216 deletions

View File

@ -0,0 +1,20 @@
package model
import (
"SciencesServer/app/common/model"
"SciencesServer/utils"
)
type UserInstance struct{ *model.UserInstance }
func (m *UserInstance) UUIDToString() string {
return utils.UintToString(m.UUID)
}
func (m *UserInstance) ValidatePassword(password string) bool {
return utils.HashCompare([]byte(m.Password), []byte(utils.Md5String(password, m.Salt)))
}
func NewUserInstance() *UserInstance {
return &UserInstance{UserInstance: model.NewUserInstance()}
}