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 PaymentStatusEnum implements IntArrayValuable {

    INIT(0, "待支付"),
    PAID(1, "已支付"),
    UNPAID(2, "未支付"),
    AUTO_REFUND(3, "已自动退款");


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

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

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

}
