first commit

This commit is contained in:
2022-03-17 15:59:24 +08:00
commit 2b0debb847
592 changed files with 73946 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
package model
// 用户地址登录请求结果
type AddressLoginResp struct {
// 用户地址
Address string `json:"address" example:"123"`
}

View File

@@ -0,0 +1,6 @@
package model
const (
Private = 0
Group = 1
)

View File

@@ -0,0 +1,7 @@
package model
import "errors"
var (
ErrPermission = errors.New("权限不足")
)

View File

@@ -0,0 +1,7 @@
package model
type GeneralResponse struct {
Result int `json:"result"`
Message string `json:"message"`
Data interface{} `json:"data"`
}

View 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"`
}

View 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"`
}