package com.ruoyi.bst.ad.domain.enums;

import com.ruoyi.bst.device.domain.enums.DeviceStatus;
import com.ruoyi.common.utils.collection.CollectionUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.List;

@Getter
@AllArgsConstructor
public enum AdStatus {

    DISABLE("0", "禁用"),
    ENABLE("1", "启用");

    private final String code;
    private final String name;

    // 允许禁用的广告状态
    public static List<String> canDisable() {
        return CollectionUtils.map(AdStatus::getCode, ENABLE);
    }

    // 允许启用的广告状态
    public static List<String> canEnable() {
        return CollectionUtils.map(AdStatus::getCode, DISABLE);
    }

}
