package com.fs.provider.enums;

public enum DoctorConfirmEnum {

    UNCONFIRMED(0, "未确认"),
    CONFIRMED(1, "已确认");

    private final Integer code;
    private final String desc;

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

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static DoctorConfirmEnum fromCode(Integer code) {
        for (DoctorConfirmEnum e : values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        throw new IllegalArgumentException("未知医生确认状态：" + code);
    }
}
