package com.jwipc.api.dto;

import lombok.Data;

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

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class SignBackDTO implements Serializable {

    //回调通知类型。不同值对应的回调action事件类型见上方表格
    private Integer callBackEnum;
    //回调通知说明
    private String callBackDesc;

    private CallBackProcessVO callBackProcessVO;

    @Data
    public static class CallBackProcessVO {
        //流程id
        public String processId;
        //第三方业务id
        public String businessNo;
        //签署状态：0草稿，1签署中，2完成，3已过期，4已拒签，5已作废，6作废中
        public Integer flowStatus;
        //流程开始时间
        public String processBeginTime;
        //流程结束时间
        public String processEndTime;
        //作废原因（签署过程中，该流程被作废的原因）
        public String revokedreason ;
        //拒签原因
        public String refuseCause;
        //作废原因
        public String cancelCause;

        public List<SignerList> signerList;
        public List<SignerList> nextSignerList;
    }

    @Data
    public static class SignerList{
        //签署后文档fileKey，仅当流程为“2-已完成”状态时返回
        public String customSignerCode;
        public String customUserCode;
        public String signDate;
        public String signMode;
        public String signNode;
        public Integer signOrder;
        public String signStatus;
        public String signerCode;
        public String signerType;
        public String userCode;
        public String userName;
        public List<SignFileList> signFileList;
    }

    @Data
    public static class SignFileList{
        public String customSignerCode;
        public String signDownloadOuterUrl;
        public String signedFileKey;
        public String fileKey;
    }
}
