feat:完善信息

This commit is contained in:
henry
2021-09-30 12:09:45 +08:00
parent 3d84af2e0c
commit 022fef28f7
23 changed files with 1111 additions and 170 deletions

View File

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

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()}
}

View File

@ -0,0 +1,13 @@
package model
import (
"SciencesServer/app/common/model"
)
type UserTenant struct {
*model.UserTenant
}
func NewUserTenant() *UserTenant {
return &UserTenant{UserTenant: model.NewUserTenant()}
}