feat:完善信息
This commit is contained in:
@ -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()}
|
||||
}
|
20
app/enterprise/model/user_instance.go
Normal file
20
app/enterprise/model/user_instance.go
Normal 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()}
|
||||
}
|
13
app/enterprise/model/user_tenant.go
Normal file
13
app/enterprise/model/user_tenant.go
Normal 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()}
|
||||
}
|
Reference in New Issue
Block a user