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 ParkingChangeStrategyEnum {

    /**
     * 按吨计费
     */
    BY_TON(1, "按吨计费"),

    /**
     * 按次计费
     */
    BY_TIME(2, "按次计费"),

    /**
     * 按月计费
     */
    BY_MONTH(3, "按月计费");

    ;

    private final Integer code;

    private final String desc;


    public static String geDesc(Integer status) {
        if (status == null) {
            return null;
        }
        for (ParkingChangeStrategyEnum carWaybillV1Enum : EnumSet.allOf(ParkingChangeStrategyEnum.class)) {
            if (carWaybillV1Enum.code.equals(status)) {
                return carWaybillV1Enum.desc;
            }
        }
        return null;
    }

}
