package com.fengqi.wechat.entity.vo;


import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

@JacksonXmlRootElement(localName = "xml")
@Data
@Accessors(chain = true)
@NoArgsConstructor
public class WechatMessageReturnVo implements Serializable {

    @JacksonXmlProperty(localName = "ToUserName")
    private String toUserName;

    @JacksonXmlProperty(localName = "FromUserName")
    private String fromUserName;

    @JacksonXmlProperty(localName = "CreateTime")
    private String createTime;

    @JacksonXmlProperty(localName = "MsgType")
    private String msgType;

    /**
     * 消息数量
     */
    @JacksonXmlProperty(localName = "ArticleCount")
    private String articleCount;

    //@JacksonXmlElementWrapper(localName ="Image") =  image;
    @JacksonXmlElementWrapper(localName ="Image")
    @JacksonXmlProperty(localName ="MediaId")
    private List<String> image;

    @JacksonXmlProperty(localName = "item")
    @JacksonXmlElementWrapper(localName = "Articles")
    private List<WechatImageMsgVo> articles;

    @JacksonXmlProperty(localName = "Content")
    private String content;

}
