package com.jwipc.api.constant;

import lombok.Getter;

@Getter
public enum SignFlowStatus {
    //0草稿，1签署中，2完成，3已过期，4已拒签，5已作废，6作废中
    Draft(0,"草稿"),
    Signing(1,"签署中"),
    Completed(2,"完成"),
    Expired(3,"已过期"),
    Rejected(4,"已拒签"),
    Invalidated(5,"已作废"),
    Invalidating(6,"作废中"),

    ;
    private final int status;
    private final String title;

    SignFlowStatus(int status, String title) {
        this.status = status;
        this.title = title;
    }

    public static SignFlowStatus forVal(int status) {
        for (SignFlowStatus value : values()) {
            if (value.getStatus() == status) {
                return value;
            }
        }
        return null;
    }
}
