package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumCarCmd {

    CAR_ETCP_LOGIN(600, "ETCP"),
    CAR_ETCP_CALLBACK_PARK_IN(601, "ETCP入场通知"),
    CAR_ETCP_CALLBACK_PARK_OUT(602, "ETCP出场通知"),
    CAR_ETCP_CALLBACK_UNBIND(603, "ETCP车辆解绑通知"),
    CAR_ETCP_CALLBACK_PAY_MANUAL(604, "ETCP支付结果通知"),
    CAR_ETCP_CALLBACK_UNPAY(605, "ETCP停车费获取"),
    CAR_TJD_CALLBACK_REGISTER(610, "停简单注册车牌"),
    CAR_TJD_CALLBACK_PARK_IN(611, "停简单进场通知"),
    CAR_TJD_CALLBACK_PARK_OUT(612, "停简单离场通知"),
    CAR_TJD_CALLBACK_PAID(613, "停简单支付通知"),
    CAR_TJD_CALLBACK_REFUND(614, "停简单退款通知"),
    ;

    public static EnumCarCmd getEnum(Integer code) {
        for (EnumCarCmd value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumCarCmd(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
