package jnpf.enums.attendance;

import lombok.Getter;

/**
 * 考勤机枚举
 *
 * @author yanwenfu
 * @create 2023-09-18
 */
@Getter
public enum MachineEnum {

    /** 猫瞳 */
    MAO_TONG("maotong", "machineMaoTongStrategy"),
    /** 开架易 */
    KAI_JIA_YI("kaijiayi", "machineKaiJiaYiStrategy"),
    /** 语雀 */
    YU_QUE("yuque", "machineYuQueStrategy"),
    /** 科密 */
    KE_MI("kemi", "machineKeMiStrategy"),
    ;

    private final String value;

    private final String description;

    MachineEnum(String value, String description) {
        this.value = value;
        this.description = description;
    }

    public static MachineEnum getMachineEnum(String value) {

        MachineEnum[] values = MachineEnum.values();
        for (MachineEnum v : values) {
            if (v.getValue().equals(value)) {
                return v;
            }
        }
        return null;
    }
}
