Skip to content

Commit

Permalink
style: 使用type编号命名消息类型
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Mar 6, 2024
1 parent 55a0c1f commit e9c71f4
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package types

// 撤回消息提示
// @type 10002
// @field Msg.Content

type RevokeContent struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package types

// 好友请求消息
// @type 37
// @field Msg.Content

type FriendRequestContent struct {
Expand Down
68 changes: 68 additions & 0 deletions wcferry/types/msg_content_49.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package types

// 引用消息
// @field Msg.Content

type ReferContent struct {
Msg struct {
AppMsg struct {
Action string `json:"action"`
Des string `json:"des"`
ReferMsg struct {
Svrid string `json:"svrid"`
} `json:"refermsg"`
Title string `json:"title"`
Type string `json:"type"` // 57
URL string `json:"url"`
} `json:"appmsg"`
CommentURL string `json:"commenturl"`
FromUsername string `json:"fromusername"`
Scene string `json:"scene"`
} `json:"msg"`
}

// 聊天记录
// @field Msg.Content

type RecordContent struct {
Msg struct {
AppMsg struct {
Action string `json:"action"`
Des string `json:"des"`
RecordItem string `json:"recorditem"`
Title string `json:"title"`
Type string `json:"type"` // 19
URL string `json:"url"`
} `json:"appmsg"`
CommentURL string `json:"commenturl"`
FromUsername string `json:"fromusername"`
Scene string `json:"scene"`
} `json:"msg"`
}

// 接收转账
// @field Msg.Content

type TransferReceiveContent struct {
Msg struct {
AppMsg struct {
Action string `json:"action"`
Des string `json:"des"`
Title string `json:"title"`
Type string `json:"type"` // 1:转账 3:已收款
URL string `json:"url"`
WCPayInfo struct {
BeginTransferTime string `json:"begintransfertime"`
EffectiveDate string `json:"effectivedate"`
FeeDesc string `json:"feedesc"`
InvalidTime string `json:"invalidtime"`
PayMemo string `json:"pay_memo"`
PayerUsername string `json:"payer_username"`
PaySubtype string `json:"paysubtype"`
ReceiverUsername string `json:"receiver_username"`
TranscationID string `json:"transcationid"`
TransferID string `json:"transferid"`
} `json:"wcpayinfo"`
} `json:"appmsg"`
} `json:"msg"`
}
22 changes: 0 additions & 22 deletions wcferry/types/msg_content_refer.go

This file was deleted.

35 changes: 0 additions & 35 deletions wcferry/types/msg_content_transfer.go

This file was deleted.

0 comments on commit e9c71f4

Please sign in to comment.