package md

type WechatButton struct {
	Name         string            `json:"name"`
	Type         string            `json:"type"`
	Url          string            `json:"url"`
	Appid        string            `json:"appid,omitempty"`
	Pagepath     string            `json:"pagepath"`
	Key          string            `json:"key,omitempty"`
	SubButton    []WechatSubButton `json:"sub_button,omitempty"`
	ReplyContent []ReplyContent    `json:"replyContent"`
}
type WechatSubButton struct {
	Type         string         `json:"type"`
	Name         string         `json:"name"`
	Url          string         `json:"url"`
	Appid        string         `json:"appid,omitempty"`
	Pagepath     string         `json:"pagepath"`
	Key          string         `json:"key"`
	ReplyContent []ReplyContent `json:"replyContent"`
	Value        string         `json:"value"`
}
type ReplyContent struct {
	Text    ReplyContentText `json:"text"`
	MsgType string           `json:"msgType"`
	Image   ReplyContentImg  `json:"image"`
}
type ReplyContentText struct {
	Content string `json:"content"`
}
type ReplyContentImg struct {
	MediaId  string `json:"mediaId"`
	MediaUrl string `json:"mediaUrl"`
	Media    string `json:"media"`
}
type OffcialWechatButton struct {
	Type      string       `json:"type,omitempty"`
	Name      string       `json:"name"`
	Key       string       `json:"key,omitempty"`
	Url       string       `json:"url"`
	Appid     string       `json:"appid,omitempty"`
	Pagepath  string       `json:"pagepath"`
	SubButton SubButtonMap `json:"sub_button,omitempty"`
}
type SubButtonMap struct {
	List []WechatSubButton `json:"list"`
}

type WechatReq struct {
	Button []WechatButton `json:"button"`
}
type WechatParam struct {
	Button []WechatButtonParam `json:"button"`
}
type WechatButtonParam struct {
	Name      string                 `json:"name"`
	Type      string                 `json:"type,omitempty"`
	Url       string                 `json:"url,omitempty"`
	Appid     string                 `json:"appid,omitempty"`
	Pagepath  string                 `json:"pagepath,omitempty"`
	Key       string                 `json:"key,omitempty"`
	SubButton []WechatSubButtonParam `json:"sub_button,omitempty"`
}
type WechatSubButtonParam struct {
	Type     string `json:"type,omitempty"`
	Name     string `json:"name"`
	Url      string `json:"url,omitempty"`
	Appid    string `json:"appid,omitempty"`
	Pagepath string `json:"pagepath,omitempty"`
	Key      string `json:"key,omitempty"`
}