package com.sckw.core.model.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

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

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

    //正常
    NORMAL(0, "正常"),
    //锁定
    NOT_NORMAL(1, "锁定");


    private final int code;

    private final String name;

    public static String getName(int code) {
        for (CarStatusEnum carStatusEnum : CarStatusEnum.values()) {
            if (carStatusEnum.getCode() == code) {
                return carStatusEnum.getName();
            }
        }
        return null;
    }
}
