package com.yc.ship.module.marketing.enums.coupon;

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

import java.util.Arrays;

@RequiredArgsConstructor
@Getter
public enum CouponTypeEnum implements IntArrayValuable {

    COUPON_TYPE_CASH(1, "现金券"),

    COUPON_TYPE_REDUCTION(2, "满减券"),

    COUPON_TYPE_DISCOUNT(3, "折扣券");

    private final int type;
    private final String name;

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTypeEnum::getType).toArray();
    @Override
    public int[] array() {
        return ARRAYS;
    }


}
