package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 请求头来源枚举
 */
@Getter
@AllArgsConstructor
public enum SourceTypeEnum {

    web("web", "PC端"),
    mobile("mobile", "移动端");

    private final String code;
    private final String description;

    public static SourceTypeEnum getByCode(String code) {
        for (SourceTypeEnum itemEnum : values()) {
            if (itemEnum.getCode().equals(code)) {
                return itemEnum;
            }
        }
        return null;
    }

}
