service/api/proto/login/proto/login_op.go

170 lines
3.0 KiB
Go

package proto
import (
"service/api/base"
accountproto "service/api/proto/account/proto"
"service/dbstruct"
)
// op 创建
type OpCreateReq struct {
base.BaseRequest
*dbstruct.Login `bcrypto:"true"`
}
type OpCreateData struct {
}
type OpCreateResp struct {
base.BaseResponse
Data *OpCreateData `json:"data"`
}
// op 删除
type OpDeleteReq struct {
base.BaseRequest
Id *int64 `json:"id"`
}
type OpDeleteData struct {
}
type OpDeleteResp struct {
base.BaseResponse
Data *OpDeleteData `json:"data"`
}
// op 更新
type OpUpdateReq struct {
base.BaseRequest
*dbstruct.Login
}
type OpUpdateData struct {
}
type OpUpdateResp struct {
base.BaseResponse
Data *OpUpdateData `json:"data"`
}
// op 列表
type OpListByPhoneHashReq struct {
base.BaseRequest
PhoneHash string `json:"phone_hash"` //用户手机号查询
RegionCode string `json:"region_code"` //国家区号
}
type OpListByPhoneHashData struct {
Login *dbstruct.Login `json:"login"`
}
type OpListByPhoneHashResp struct {
base.BaseResponse
Data *OpListByPhoneHashData `json:"data"`
}
// 登录操作
type OpLoginByPswdReq struct {
base.BaseRequest
MobilePhoneInfoComponent `jcrypto:"true"`
PasswordComponent
}
type OpLoginByVeriCodeReq struct {
base.BaseRequest
MobilePhoneInfoComponent `jcrypto:"true"`
VeriCodeComponent
Inviter *int64 `json:"inviter"`
}
type OpLoginData struct {
IsEnabled int64 `json:"is_enabled"` //是否启用标志
Token string `json:"token"` //token
AccountVO *accountproto.OpListVO `json:"account"` //用户信息
}
type OpLoginResp struct {
base.BaseResponse
Data *OpLoginData `json:"data"`
}
type OpLogoutReq struct {
base.BaseRequest
Mid *int64 `json:"mid"` // mid
}
type OpLogoutData struct {
OpResult bool `json:"op_result"`
}
type OpLogoutResp struct {
base.BaseResponse
Data *OpLogoutData `json:"data"`
}
// 改密操作
type OpUpdatePswdReq struct {
base.BaseRequest
MobilePhoneInfoComponent `jcrypto:"true"`
PasswordComponent
VeriCodeComponent
}
type OpUpdatePswdData struct {
OpResult bool `json:"op_result"` //操作结果
}
type OpUpdatePswdResp struct {
base.BaseResponse
Data *OpUpdatePswdData `json:"data"`
}
// 设置密码操作
type OpSetPswdReq struct {
base.BaseRequest
MobilePhoneInfoComponent `jcrypto:"true"`
PasswordComponent
}
type OpSetPswdData struct {
OpResult bool `json:"op_result"` //操作结果
}
type OpSetPswdResp struct {
base.BaseResponse
Data *OpSetPswdData `json:"data"`
}
// 重置密码操作
type OpResetPswdReq struct {
base.BaseRequest
MobilePhoneInfoComponent `jcrypto:"true"`
PasswordComponent
VeriCodeComponent
}
type OpResetPswdData struct {
OpResult bool `json:"op_result"` //操作结果
}
type OpResetPswdResp struct {
base.BaseResponse
Data *OpResetPswdData `json:"data"`
}
// op 按mid更新
type OpUpdateByMidReq struct {
base.BaseRequest
*dbstruct.Login
Mid *int64 `json:"mid"`
}
type OpUpdateByMidData struct {
}
type OpUpdateByMidResp struct {
base.BaseResponse
Data *OpUpdateByMidData `json:"data"`
}