package cd.casic.module.machine.enums;


import cd.casic.framework.commons.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

@Getter
@AllArgsConstructor
public enum MachineProxyStatus implements IntArrayValuable {
    /**
     * 代理状态 (online, offline, installing, updating, error)
     */
    ONLINE(1, "online"),
    OFFLINE(2, "offline"),
    INSTALLING(3, "installing"),
    UPDATING(4, "updating"),
    ERROR(5, "error");

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

    private final int code;

    private final String message;

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