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


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

import java.util.Arrays;

/**
 * 订单绑定类型
 *
 */
@RequiredArgsConstructor
@Getter
public enum TradeOrderBindEnum implements IntArrayValuable {

    ORDER_BIND(0, "订单关联"),
    STOCK_DIRECT(1, "定向库存"),
    CHANGE(2, "改签"),
    ADD_ORDER(3, "增加产品或数量"),
    COUPON(4, "优惠券"),
    PERSONAL_DISTRIBUTOR(5, "个人分销商"),
    LINK(6, "链接管理"),
    MARKETING_POLICY(7, "营销政策"),
    MARKETING_POLICY_COUPON(8, "营销政策优惠券");


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

    /**
     * 类型
     */
    private final Integer type;
    /**
     * 类型名
     */
    private final String name;

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

}
