package com.ytpm.agent.enums;


import lombok.Getter;

/**
 * 广告记录 保存时登陆状态
 * @author lih
 * @date 2025/9/11
 */

@Getter
public enum AdRecordEnum {
    LOGIN_BEFORE(1,"登陆前"),
    LOGIN_AFTER(2, "登陆后")
    ;

    private final Integer code;
    private final String desc;

    AdRecordEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    /**
     * 根据编码获取状态
     */
    public static String getByCode(Integer code){
        for (UserStatusEnum value : UserStatusEnum.values()) {
            if(!value.getCode().equals(code))continue;
            return value.getDesc();
        }
        return "";
    }
}
