first commit
This commit is contained in:
7
gateway/api/v1/internal/model/account.go
Normal file
7
gateway/api/v1/internal/model/account.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
// 用户地址登录请求结果
|
||||
type AddressLoginResp struct {
|
||||
// 用户地址
|
||||
Address string `json:"address" example:"123"`
|
||||
}
|
||||
6
gateway/api/v1/internal/model/const.go
Normal file
6
gateway/api/v1/internal/model/const.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
Private = 0
|
||||
Group = 1
|
||||
)
|
||||
7
gateway/api/v1/internal/model/error.go
Normal file
7
gateway/api/v1/internal/model/error.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
ErrPermission = errors.New("权限不足")
|
||||
)
|
||||
7
gateway/api/v1/internal/model/general.go
Normal file
7
gateway/api/v1/internal/model/general.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
type GeneralResponse struct {
|
||||
Result int `json:"result"`
|
||||
Message string `json:"message"`
|
||||
Data interface{} `json:"data"`
|
||||
}
|
||||
7
gateway/api/v1/internal/model/modules.go
Normal file
7
gateway/api/v1/internal/model/modules.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
type GetModuleResp struct {
|
||||
Name string `json:"name" enums:"wallet,oa,redpacket"`
|
||||
IsEnabled bool `json:"isEnabled"`
|
||||
EndPoints []string `json:"endPoints"`
|
||||
}
|
||||
50
gateway/api/v1/internal/model/record.go
Normal file
50
gateway/api/v1/internal/model/record.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package model
|
||||
|
||||
type RevokeMsgReq struct {
|
||||
Type int `json:"type" enums:"0,1"`
|
||||
Mid int64 `json:"logId" binding:"required"`
|
||||
}
|
||||
|
||||
type FocusMsgReq struct {
|
||||
Type int `json:"type" enums:"0,1"`
|
||||
LogId int64 `json:"logId" binding:"required"`
|
||||
}
|
||||
|
||||
type Record struct {
|
||||
// log id
|
||||
Mid string `json:"logId"`
|
||||
// msg id (uuid)
|
||||
Seq string `json:"msgId"`
|
||||
// 发送者 id
|
||||
FromId string `json:"fromId"`
|
||||
// 接收者 id
|
||||
TargetId string `json:"targetId"`
|
||||
// 消息类型
|
||||
MsgType int32 `json:"msgType"`
|
||||
// 消息内容
|
||||
Content interface{} `json:"content"`
|
||||
// 消息发送时间
|
||||
CreateTime uint64 `json:"createTime"`
|
||||
}
|
||||
|
||||
type GetPriRecordsReq struct {
|
||||
// 发送者 ID
|
||||
FromId string `json:"-"`
|
||||
|
||||
// 发送者 ID
|
||||
//FromId string `json:"fromId" binding:"required"`
|
||||
|
||||
// 接受者 ID
|
||||
TargetId string `json:"targetId" binding:"required"`
|
||||
// 消息数量
|
||||
RecordCount int64 `json:"count" binding:"required,min=1,max=100"`
|
||||
// 消息 ID
|
||||
Mid string `json:"logId"`
|
||||
}
|
||||
|
||||
type GetPriRecordsResp struct {
|
||||
// 聊天记录数量
|
||||
RecordCount int `json:"record_count"`
|
||||
// 聊天记录
|
||||
Records []*Record `json:"records"`
|
||||
}
|
||||
Reference in New Issue
Block a user