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