package message import "context" // EventType 事件类型 type EventType string const ( //EventCheckUrl 验证URL EventCheckUrl EventType = "check_url" //EventCalendarChange 日程变更 EventCalendarChange = "calendar_event_change" //BpmsInstanceChange 审批实例变更 BpmsInstanceChange = "bpms_instance_change" //BpmsInstanceChange 审批任务变更 BpmsTaskChange = "bpms_task_change" ) // SubsMessage 订阅消息 type SubsMessage struct { Ctx context.Context Encrypt string `json:"encrypt"` } //MixMessage 存放所有钉钉发送过来的消息和事件 type MixMessage struct { EventType EventType `json:"EventType"` // 审批相关 ProcessInstanceId string `json:"processInstanceId"` CorpId string `json:"corpId"` CreateTime string `json:"createTime"` FinishTime string `json:"finishTime"` Title string `json:"title"` ProcessType string `json:"type"` StaffId string `json:"staffId"` Url string `json:"url"` Result string `json:"result"` ProcessCode string `json:"processCode"` Remark string `json:"remark"` // 日程变更 ChangeType string `json:"changeType"` CalendarEventId string `json:"CalendarEventId"` UnionIdList []string `json:"processCode"` } //Reply 消息回复 type Reply struct { MsgSignature string `json:"msg_signature"` TimeStamp string `json:"timeStamp"` Nonce string `json:"nonce"` Encrypt string `json:"encrypt"` }