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 CouponProductTypeEnum implements IntArrayValuable {
    ALL(1, "全部"),
    CATEGORY(2, "产品分类"),
    CUSTOM(3, "自定义"),
    ;

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

    private final Integer type;
    private final String name;

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