package com.trade.service.contract.util.esign.entity;

import com.trade.service.contract.dto.ContractSignCallBack;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 签宝：签署人签署状态通知实体
 */
public class ESignProcessStatus extends ContractSignCallBack {

    private static final long serialVersionUID = -9094202040725251594L;
    /**
     * 签署人完成签署通知：标记该通知的业务类型(required)，该通知固定为：SIGN_FLOW_UPDATE<br/>
     * 签署流程结束通知：标记该通知的业务类型(required)，该通知固定为：SIGN_FLOW_FINISH
     */
    private String action;
    /**
     * 第三方流水号
     */
    private String thirdOrderNo;
    /**
     * 签署人的签署顺序
     */
    private String order;
    /**
     * 签约主体的账号id（个人/企业）；如签署人本签署，则返回签署人账号id；如签署人代机构签署，则返回机构账号id <br/>
     * ,当存在多个签约主体时，返回多个，并逗号隔开(required)
     */
    private String authorizedAccountId;
    /**
     * 签署任务 id (required)
     */
    private String flowId;
    /**
     * 签署人的accountId
     */
    private String accountId;
    /**
     * 签署时间或拒签时间 (required)
     */
    // @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime signTime;
    /**
     * 签署结果 (required) </br>
     * 2:签署完成 </br>
     * 3:失败 </br>
     * 4:拒签 </br>
     */
    private int signResult;
    /**
     * 拒签或失败时，附加的原因描述
     */
    private String resultDescription;
    /**
     * 时间戳
     **/
    private Long timestamp;
    /**
     * 签署文件主题描述
     */
    private String businessScence;
    /**
     * 可能存在的任务状态 (required)</br>
     * 2 已完成: 所有签署人完成签署 </br>
     * 3 已撤销: 发起方撤销签署任务 </br>
     * 4 已终止: 至少一个签署人拒签或通过重试 不可恢复的签署失败 </br>
     * 5 已过期: 超时未签署 </br>
     * 6 已删除 </br>
     * 7 已拒签 <br>
     */
    private int flowStatus;
    /**
     * 当流程异常结束时，附加终止原因描述
     */
    private String statusDescription;
    /**
     * 签署任务发起时间 (required)
     */
    // @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 签署任务结束时间 (required)
     */
    // @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getThirdOrderNo() {
        return thirdOrderNo;
    }

    public void setThirdOrderNo(String thirdOrderNo) {
        this.thirdOrderNo = thirdOrderNo;
    }

    public String getFlowId() {
        return flowId;
    }

    public void setFlowId(String flowId) {
        this.flowId = flowId;
    }

    public int getSignResult() {
        return signResult;
    }

    public void setSignResult(int signResult) {
        this.signResult = signResult;
    }

    public String getResultDescription() {
        return resultDescription;
    }

    public void setResultDescription(String resultDescription) {
        this.resultDescription = resultDescription;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public String getAuthorizedAccountId() {
        return authorizedAccountId;
    }

    public void setAuthorizedAccountId(String authorizedAccountId) {
        this.authorizedAccountId = authorizedAccountId;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getBusinessScence() {
        return businessScence;
    }

    public void setBusinessScence(String businessScence) {
        this.businessScence = businessScence;
    }

    public int getFlowStatus() {
        return flowStatus;
    }

    public void setFlowStatus(int flowStatus) {
        this.flowStatus = flowStatus;
    }

    public String getStatusDescription() {
        return statusDescription;
    }

    public void setStatusDescription(String statusDescription) {
        this.statusDescription = statusDescription;
    }

    public LocalDateTime getSignTime() {
        return signTime;
    }

    public void setSignTime(LocalDateTime signTime) {
        this.signTime = signTime;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }
}
