package cn.newfeifan.mall.module.sale.enums;

import cn.newfeifan.mall.framework.common.core.IntArrayValuable;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Arrays;

/**
 * 交易订单 - 关闭类型
 *
 * @author Sin
 */
@RequiredArgsConstructor
@Getter
public enum MerchantStatusEnum implements IntArrayValuable {

    USING(10, "使用中"),
    OVERDUE(20, "过期"),
    STOP(30, "停用");

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

    /**
     * 关闭类型
     */
    private final Integer type;
    /**
     * 关闭类型名
     */
    private final String name;

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

}
