package com.jwipc.tender.constant;

import lombok.Getter;

import java.util.List;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */

@Getter
public enum TenderStatus {
    NEW(0, "新建"),
    APPROVALING(1, "发布待确认"),
    RELEASE(2, "发布"),
    EXPIRED(3, "已截止"),
    OPENED(4, "已开标"),
    RATED(5, "已定标"),
    BIDING_APPR(6, "定标审批中"),
    SUPERVISOR_CONFIRMATION(7, "主管确认"),
    PRICE_CONFIRMATION(8, "价格确认中"),
    COMPLETED(9, "已完成"),
    BIDING_APPR_REJECT(97, "定标驳回"),
    REJECT(98, "发布驳回"),
    VOID(99, "作废");

    private final int status;
    private final String name;

    TenderStatus(int status, String name) {
        this.status = status;
        this.name = name;
    }

    /**
     * 获取定标列表中需要展示的数据状态
     *
     * @return
     */
    public static List<Integer> getBenchmarksStatus() {
        return List.of(RATED.getStatus(), COMPLETED.getStatus(),OPENED.getStatus(), EXPIRED.getStatus(), BIDING_APPR.getStatus(),
                REJECT.getStatus(), PRICE_CONFIRMATION.getStatus(), SUPERVISOR_CONFIRMATION.getStatus());
    }
}
