package com.ylx.order.enums;

import lombok.Getter;

@Getter
public enum RefundStageTypeEnum {

    /**
     * 商户未出发前
     */
    PRE_DEPARTURE(0, "商户未出发前"),

    /**
     * 商户已出发
     */
    ON_THE_WAY(1, "商户已出发"),

    /**
     * 服务中订单
     */
    IN_SERVICE(2, "服务中订单");

    private final Integer code;
    private final String info;

    RefundStageTypeEnum(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public static RefundStageTypeEnum getByCode(Integer code) {
        for (RefundStageTypeEnum e : values()) {
            if (e.getCode().equals(code)) return e;
        }
        return null;
    }

}
