package com.yc.ship.module.trade.enums;


import com.yc.ship.framework.common.core.IntArrayValuable;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Arrays;

/**
 * 补票订单 - 状态
 *
 */
@RequiredArgsConstructor
@Getter
public enum TradeSTStatusEnum implements IntArrayValuable {

    CANCEL(-1, "已取消"),
    INIT(0, "待支付"),
    PAID(1, "已支付"),
    FAIL(2, "支付失败"),
    REFUND(3, "已退款"),
    PART_REFUND(4, "部分退款");


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

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

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

}
