package com.iformall.enums;

/**
 * Created by luozukai
 */
public enum EnumFlowRecordStatus {

    NEW(1, "发起申请"),
    APPLY(2, "审批通过"),
    REJECT(3, "审批驳回"),
    ASSIGNEE(4, "待审批"),
    CANCLE(5, "合同作废"),
    SETBACK(6, "撤回"),
    //ADVANCE_END(6, "提前终止"),
    //ADVANCE_END(7, "审批完成"),
    ;

    public static EnumFlowRecordStatus getEnum(Integer code) {
        for (EnumFlowRecordStatus value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumFlowRecordStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
