dingding/model/msg-model.go

94 lines
2.4 KiB
Go
Raw Normal View History

2022-03-28 02:07:22 +00:00
package model
type MsgReq struct {
Msg Msg `json:"msg"`
DeptIDList string `json:"dept_id_list"`
ToAllUser bool `json:"to_all_user"`
AgentID int `json:"agent_id"`
UseridList string `json:"userid_list"`
}
type MsgResp struct {
Errcode int `json:"errcode"`
TaskID int64 `json:"task_id"`
RequestID string `json:"request_id"`
}
type Msg struct {
Voice Voice `json:"voice"`
Image Image `json:"image"`
Oa Oa `json:"oa"`
File File `json:"file"`
ActionCard ActionCard `json:"action_card"`
Link Link `json:"link"`
Markdown Markdown `json:"markdown"`
Text Text `json:"text"`
Msgtype string `json:"msgtype"`
}
type Voice struct {
Duration string `json:"duration"`
MediaID string `json:"media_id"`
}
type Image struct {
MediaID string `json:"media_id"`
}
type Head struct {
Bgcolor string `json:"bgcolor"`
Text string `json:"text"`
}
type StatusBar struct {
StatusValue string `json:"status_value"`
StatusBg string `json:"status_bg"`
}
type Form struct {
Value string `json:"value"`
Key string `json:"key"`
}
type Rich struct {
Unit string `json:"unit"`
Num string `json:"num"`
}
type Body struct {
FileCount string `json:"file_count"`
Image string `json:"image"`
Form Form `json:"form"`
Author string `json:"author"`
Rich Rich `json:"rich"`
Title string `json:"title"`
Content string `json:"content"`
}
type Oa struct {
Head Head `json:"head"`
PcMessageURL string `json:"pc_message_url"`
StatusBar StatusBar `json:"status_bar"`
Body Body `json:"body"`
MessageURL string `json:"message_url"`
}
type File struct {
MediaID string `json:"media_id"`
}
type BtnJSONList struct {
ActionURL string `json:"action_url"`
Title string `json:"title"`
}
type ActionCard struct {
BtnJSONList BtnJSONList `json:"btn_json_list"`
SingleURL string `json:"single_url"`
BtnOrientation string `json:"btn_orientation"`
SingleTitle string `json:"single_title"`
Markdown string `json:"markdown"`
Title string `json:"title"`
}
type Link struct {
PicURL string `json:"picUrl"`
MessageURL string `json:"messageUrl"`
Text string `json:"text"`
Title string `json:"title"`
}
type Markdown struct {
Text string `json:"text"`
Title string `json:"title"`
}
type Text struct {
Content string `json:"content"`
}