package com.qunzhixinxi.hnqz.admin.entity;

import com.qunzhixinxi.hnqz.admin.util.CDataAdapter;
import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.List;

/**
 * 微信请求消息体
 *
 * @author lixuesong
 * @date 2021年04月29日 9:24
 */
@Data
@XmlRootElement(name="xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class SysWxReplyMessagePostBody {

	/**
	 * 接收方帐号（收到的OpenID）
	 */
	@XmlJavaTypeAdapter(CDataAdapter.class)
	@XmlElement(name = "ToUserName")
	private String toUserName;

	/**
	 * 开发者微信号
	 */
	@XmlJavaTypeAdapter(CDataAdapter.class)
	@XmlElement(name = "FromUserName")
	private String fromUserName;

	/**
	 * 消息创建时间
	 */
	@XmlElement(name = "CreateTime")
	private String createTime;

	/**
	 * 消息类型（文本为text，图片为image，语音为voice，视频为video，音乐为music，图文为news，客服transfer_customer_service）
	 */
	@XmlJavaTypeAdapter(CDataAdapter.class)
	@XmlElement(name = "MsgType")
	private String msgType;

	/**
	 * 回复的消息内容
	 */
	@XmlJavaTypeAdapter(CDataAdapter.class)
	@XmlElement(name = "Content")
	private String content;

	/**
	 * 图文消息个数
	 */
	@XmlElement(name = "ArticleCount")
	private String articleCount;

	/**
	 * 图片
	 */
	@XmlElement(name = "Image")
	private SysWxReplyMessageImagePostBody image;

	/**
	 * 视频
	 */
	@XmlElement(name = "Video")
	private SysWxReplyMessageVideoPostBody video;

	/**
	 * 图文消息列表
	 */
	@XmlElement(name = "Articles")
	private List<SysWxReplyMessageItemPostBody> articleList;

}
