102 lines
1.6 KiB
Go
102 lines
1.6 KiB
Go
package proto
|
|
|
|
import (
|
|
"service/api/base"
|
|
"service/dbstruct"
|
|
)
|
|
|
|
// op 创建
|
|
type OpCreateReq struct {
|
|
base.BaseRequest
|
|
*dbstruct.VeriCode
|
|
}
|
|
|
|
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.VeriCode
|
|
}
|
|
|
|
type OpUpdateData struct {
|
|
}
|
|
|
|
type OpUpdateResp struct {
|
|
base.BaseResponse
|
|
Data *OpUpdateData `json:"data"`
|
|
}
|
|
|
|
// op 列表
|
|
type OpListByPhoneHashReq struct {
|
|
base.BaseRequest
|
|
PhoneHash string `json:"phone_hash"` // 手机号hash值
|
|
RegionCode string `json:"region_code"` // 地区编号
|
|
}
|
|
|
|
type OpListByPhoneHashData struct {
|
|
VeriCode *dbstruct.VeriCode `json:"veri_code"`
|
|
Offset int `json:"offset"`
|
|
More int `json:"more"`
|
|
}
|
|
|
|
type OpListByPhoneHashResp struct {
|
|
base.BaseResponse
|
|
Data *OpUpdateData `json:"data"`
|
|
}
|
|
|
|
// send
|
|
type OpSendReq struct {
|
|
base.BaseRequest
|
|
MobilePhone string `json:"mobile_phone" jcrypto:"rsa"`
|
|
RegionCode string `json:"region_code"`
|
|
Trigger string `json:"trigger"`
|
|
}
|
|
|
|
const (
|
|
VerifyCodeTriggerWithdraw = "withdraw"
|
|
)
|
|
|
|
type OpSendData struct {
|
|
Result bool
|
|
}
|
|
|
|
type OpSendResp struct {
|
|
base.BaseResponse
|
|
Data *OpSendData `json:"data"`
|
|
}
|
|
|
|
// op 按mid删除
|
|
type OpDeleteByMidReq struct {
|
|
base.BaseRequest
|
|
Mid *int64 `json:"mid"`
|
|
}
|
|
|
|
type OpDeleteByMidData struct {
|
|
}
|
|
|
|
type OpDeleteByMidResp struct {
|
|
base.BaseResponse
|
|
Data *OpDeleteByMidData `json:"data"`
|
|
}
|