You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
820 B
Go

/**
* @Author: jager
* @Email: lhj168os@gmail.com
* @File: types
* @Date: 2021/12/31 4:32 下午
* @package: types
* @Version: v1.0.0
*
* @Description:
*
*/
package types
import (
"idata/internal/apity"
"time"
)
type RUser interface {
Uid() string
Openid() string
Phone() string
Secret() string
Name() string
Gender() int64
Avatar() string
Score() int64
IsVip() bool
VerifyPwd(pwd string) bool
ApiOpened(ty apity.ApiType) bool
ApiCanReq(ty apity.ApiType) bool
Info() map[string]interface{}
}
type RWUser interface {
RUser
SetOpenid(openid string)
SetPhone(phone string)
SetSecret(secret string)
SetName(name string)
SetAvatar(avatar string)
SetGender(gender int64)
SetScore(score int64)
SetPassword(pwd string)
OpenApi(ty apity.ApiType)
OpenVip(duration time.Duration)
}