package org.wcs.constant.enums.database;

import lombok.Getter;
import org.wcs.constant.enums.common.OnOrOffEnum;

@Getter
public enum TrayConveyLocationTypeEnum {

    UNKNOWN(-1, "未知"),
    TRUE(1, "任务点"),
    FALSE(0, "普通点");

    private final int code;
    private final String msg;

    TrayConveyLocationTypeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static TrayConveyLocationTypeEnum getByCode(int code) {
        for (TrayConveyLocationTypeEnum value : TrayConveyLocationTypeEnum.values()) {
            if (value.code == code) {
                return value;
            }
        }
        return UNKNOWN;
    }


}
