package com.fs.wxwork.enums;

import lombok.Getter;

/**
 * DeverTypeEnum
 * 设备类型枚举
 *
 * @author xdd
 * @version 1.0
 * @since 1.0
 * date: 2025-02-27
 */
@Getter
public enum DeverTypeEnum {

    /**
     * iPad 设备
     */
    IPAD("iPad"),

    /**
     * 个人电脑
     */
    PC("pc"),

    /**
     * Mac 设备
     */
    MAC("mac");


    private final String value;

    DeverTypeEnum(String value) {
        this.value = value;
    }

    /**
     * 根据value获取枚举
     *
     * @param value value
     * @return DeverTypeEnum
     */
    public static DeverTypeEnum getByValue(String value) {
        for (DeverTypeEnum typeEnum : DeverTypeEnum.values()) {
            if (typeEnum.getValue().equalsIgnoreCase(value)) {
                return typeEnum;
            }
        }
        return null;
    }
}
