package com.cyksj.model.kf;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


@NoArgsConstructor
@Data
public class WxCpKfMsgListResp {


  @JsonProperty("errcode")
  protected Long errcode;

  @JsonProperty("errmsg")
  protected String errmsg;

  private static final long serialVersionUID = -3115552079069452091L;
  @JsonProperty("next_cursor")
  private String nextCursor;

  /**
   * 是否还有更多数据。0-否；1-是。
   */
  @JsonProperty("has_more")
  private Integer hasMore;

  @JsonProperty("msg_list")
  private List<WxCpKfMsgItem> msgList;

  @NoArgsConstructor
  @Data
  public static class WxCpKfMsgItem {
    @JsonProperty("msgid")
    private String msgId;
    @JsonProperty("open_kfid")
    private String openKfid;
    @JsonProperty("external_userid")
    private String externalUserId;
    @JsonProperty("send_time")
    private Long sendTime;
    //消息来源。3-微信客户发送的消息 4-系统推送的事件消息 5-接待人员在企业微信客户端发送的消息
    private Integer origin;
    @JsonProperty("servicer_userid")
    private String servicerUserId;
    @JsonProperty("old_servicer_userid")
    private String oldServicerUserid;
    @JsonProperty("new_servicer_userid")
    private String newServicerUserid;
    @JsonProperty("msgtype")
    private String msgType;
    private WxCpKfEventMsg event;
    //聊天记录事件
    @JsonProperty("merged_msg")
    private WxCorpChatMsg mergedMsg;
    //文本消息
    private WxCorpTextMsg text;
    //图片消息
    private WxCorpImageMsg image;
    //视频消息
    private WxCorpVideoMsg video;
    //链接消息
    private WxCorpLinkMsg link;
    //文件消息
    private WxCorpFileMsg file;
    //菜单消息
    private WxCorpMenuMsg msgmenu;
  }
}
