package com.fs.his.enums;

import java.util.stream.Stream;

public enum FsUserOperationEnum {
    MINLOGIN("小程序登录",1),
    H5LOGIN("h5登录",2),
    BEMEMBER("成为会员",3),
    ISADDKF("判断是否成为会员",4),
    STUDY("学习课程",5),
    ANSWER("答题",6),
    SENDREWARD("发送奖励",7);

    private final String label;
    private final Integer value;

    FsUserOperationEnum(String label, Integer value) {
        this.label = label;
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public Integer getValue() {
        return value;
    }
    public static FsUserOperationEnum toType(String label) {
        return Stream.of(FsUserOperationEnum.values())
                .filter(p -> p.label.equals(label))
                .findAny()
                .orElse(null);
    }
}
