package com.ruoyi.info.order.exception;

import com.ruoyi.common.enums.IIntegerEnum;
import java.util.Objects;


/**
 * 异常枚举
 */
public enum OrderWorkerChangeRecordExceptionEnum implements IIntegerEnum {

    // TODO 注意检查错误码，保证系统内唯一
    OrderWorkerChangeRecord_IS_NOT_EXISTS(210001, "订单更换分配护工记录不存在"),

    ;

    private Integer code;

    private String msg;

    OrderWorkerChangeRecordExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static OrderWorkerChangeRecordExceptionEnum getByCode(int code, OrderWorkerChangeRecordExceptionEnum[] values) {
        for (OrderWorkerChangeRecordExceptionEnum value : values) {
            if (Objects.equals(code, value.getCode())) {
                return value;
            }
        }
        return null;
    }

}
