package com.fs.course.enums;

public enum MiniProgramAgreementEnum {

    DOCTOR_REGISTER("doctorRegister", "医生注册协议"),
    DOCTOR_FILING("doctorFiling", "医生多机构备案协议"),
    USER_REGISTER("userRegister", "用户协议"),
    USER_PRIVACY("userPrivacy", "隐私协议"),
    USER_HEALTH("userHealth", "健康客服协议"),
    VIP_SERVICE("vipService", "会员服务协议"),
    VIP_AUTOMATIC_SERVICE("vipAutomaticService", "会员自动续费协议"),
    USER_REMOVE_SERVICE("userRemoveService", "用户注销协议");
    private String code;
    private String message;
    MiniProgramAgreementEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

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


    public static String getMessage(String code) {
        for (MiniProgramAgreementEnum value : MiniProgramAgreementEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getMessage();
            }
        }
        return null;
    }



}
