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

import com.yc.ship.framework.common.core.ArrayValuable;
import lombok.Getter;

import java.util.Arrays;


@Getter
public enum InsuranceStatusEnum implements ArrayValuable<Integer> {

    INSURE(0, "投保中"),
    SUCCESS(1, "成功"),
    FAIL(2, "失败"),
    CANCELLED(3, "已退保");

    private final String name;
    private final Integer value;
    public static final Integer[] ARRAYS = Arrays.stream(values()).map(InsuranceStatusEnum::getValue).toArray(Integer[]::new);

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

    InsuranceStatusEnum(Integer status, String name) {
        this.value = status;
        this.name = name;
    }
}