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

34 lines
650 B

package values
import (
"time"
)
// 用户身份
const (
UserRoleAdmin = iota + 1 // 管理员
UserRole1 // 主管
UserRole2 // 普通客服
)
const (
RedisTokenEx = 60 * time.Minute
)
// LoginReq 登录请求
type LoginReq struct {
Account string `json:"Account" binding:"required"`
Pass string `json:"Pass" binding:"required"`
}
// LoginResp 登录返回
// Power:权限
// Role:账户等级,1管理员
// Token:身份码,登录成功后的所有请求需在header里加入token字段以进行后续请求
// 账户id
type LoginResp struct {
Power interface{}
Token string
Role int
Id int
}