package com.cf.imes.module.system.enums.advertisement;

import com.cf.imes.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 广告状态单位态枚举
 *
 * @author 晨丰科技
 */
@Getter
@AllArgsConstructor
public enum AdvertisementStatusEnum implements IntArrayValuable {

    UNPUBLISHED(0, "未发布"),
    PUBLISHED(1, "已发布"),
    ENDED(2, "已结束");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AdvertisementStatusEnum::getStatus).toArray();

    /**
     * 状态值
     */
    private final Integer status;
    /**
     * 状态名
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }


}
