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 CouponDeliverUserGroupType implements IntArrayValuable {
    ALL(1, "全部"),
    NEW_USER(2, "新用户"),
    SOME_USER(3, "部分会员"),
    ;

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

    private final int type;
    private final String name;

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