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 CouponEffectiveTypeEnum implements IntArrayValuable {
    FIXED_TIME(1, "固定时间"),
    RELATIVE_TIME(2, "相对时间");
    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponEffectiveTypeEnum::getType).toArray();
    private final int type;
    private final String name;
    @Override
    public int[] array() {
        return ARRAYS;
    }
}
