Files
2021-09-29 16:25:56 +08:00

23 lines
462 B
Go

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