package com.qmth.themis.common.enums;

public enum Platform {

    WEB("ADMIN_WEB"),
    WIN("ADMIN_CLIENT,OE_CLIENT"),
    MAC("ADMIN_CLIENT,OE_CLIENT"),
    WXAPP("OE_ANSWER"),
    IOS("OE_ANSWER,MOBILE_FIRST,MOBILE_SECOND"),
    ANDROID("OE_ANSWER,MOBILE_FIRST,MOBILE_SECOND");

    public static Platform findByName(String name) {
        if (name == null) {
            return null;
        }
        for (Platform item : Platform.values()) {
            if (item.toString().equalsIgnoreCase(name)) {
                return item;
            }
        }
        return null;
    }

    private String source;

    Platform(String source) {
        this.source = source;
    }

    public String getSource() {
        return source;
    }

    public boolean equals(String name) {
        return toString().equalsIgnoreCase(name);
    }
}
