package com.sckw.core.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.EnumSet;

/**
 * @author lfdc
 * @desc 车辆往来运单状态枚举
 * @date 2023-07-14 14:07:23
 */
@Getter
@AllArgsConstructor
public enum GatekeeperTypeEnum {

    /**
     * 门卫装货单
     */
    LOADING(1,  "门卫装货单"),

    /**
     * 门卫卸货单
     */
    UNLOADING(2,  "门卫卸货单"),

    ;

    private final Integer code;

    private final String destination;


    public static String getDesc(Integer status) {
        if (status == null) {
            return null;
        }
        for (GatekeeperTypeEnum forkliftStatusEnum : EnumSet.allOf(GatekeeperTypeEnum.class)) {
            if (forkliftStatusEnum.code.equals(status)) {
                return forkliftStatusEnum.destination;
            }
        }
        return null;
    }

}
