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

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

import java.util.Arrays;


@Getter
public enum RefundRuleEnum implements IntArrayValuable {

    NOT_REFUND(0, "不可退"),
    NO_PAY_FEE(1, "未消费票允许发起退票，不收取手续费"),
    PAY_FEE(2, "未消费票允许发起退票，收取手续费"),
    REFUND_PERCENT(3, "未消费票允许按订单人数比例退票"),
    AUDIT(4, "退票需审核"),
    REFUND_ANY(5, "随时退"),
    USE_DATE_AUDIT(6, "出行日后退票审核");

    private final String name;
    private final Integer value;
    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(RefundRuleEnum::getValue).toArray();

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

    RefundRuleEnum(Integer status, String name) {
        this.value = status;
        this.name = name;
    }
}