package com.ruoyi.project.business.enums;

import com.ruoyi.common.exception.ServiceErrorException;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum SignTypeEnum {

    /**
     * 会签
     */
    COUNTER_SIGN(1),
    OR_SIGN(2);

    private Integer value;

    public static SignTypeEnum from(Integer value) {
        for (SignTypeEnum taskTypeEnum : values()) {
            if (taskTypeEnum.getValue().equals(value)) {
                return taskTypeEnum;
            }
        }
        throw new ServiceErrorException("非法的审批类型状态");
    }
}
