feat:优化信息

This commit is contained in:
henry
2021-12-22 14:53:45 +08:00
parent 332f67d1c1
commit 4743481ef8
5 changed files with 27 additions and 24 deletions

View File

@ -14,7 +14,8 @@ type Enterprise struct {
Avatar string `json:"avatar"` // 头像
Name string `json:"name"` // 名称
Mobile string `json:"mobile"` // 手机号码
Vip bool `json:"vip"` // VIP状态
Vip int `json:"vip"` // VIP
VipStatus bool `json:"vip_status"` // VIP状态
VipDeadline time.Time `json:"vip_deadline"` // VIP过期时间
Currency float64 `json:"currency"` // 货币-创新币
Identity int `json:"identity"` // 总身份信息
@ -33,8 +34,8 @@ func (this *Enterprise) UIDToString() string {
return utils.UintToString(this.UID)
}
func (this *Enterprise) VipStatus() bool {
return this.Vip && this.VipDeadline.After(time.Now())
func (this *Enterprise) IsVip() bool {
return this.VipStatus && this.VipDeadline.After(time.Now())
}
func (this *Enterprise) MarshalBinary() ([]byte, error) {