package com.fs.provider.enums;

/**
 * 服务单任务生成配置 - 审核状态枚举
 */
public enum ServiceOrderConfigAuditStatusEnum {

    WAIT_AUDIT(0, "待审核"),
    AUDIT_PASS(1, "审核通过"),
    AUDIT_REJECT(2, "审核不通过"),
    NO_NEED_AUDIT(3, "无需审核");

    private final Integer code;
    private final String desc;

    ServiceOrderConfigAuditStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static ServiceOrderConfigAuditStatusEnum of(Integer code) {
        if (code == null) {
            return null;
        }
        for (ServiceOrderConfigAuditStatusEnum status : values()) {
            if (status.code.equals(code)) {
                return status;
            }
        }
        return null;
    }
}
