package com.qmth.paper.library.business.enums;

import java.util.Objects;

/**
 * @Description 图片张数比较
 */
public enum PictureSymbolEnum {
    GREAT_THEN("大于"),
    EQUAL("等于"),
    LESS_THEN("小于"),
    NOT_EQUAL("不等于");

    private final String desc;

    PictureSymbolEnum(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    /**
     * 状态转换
     */
    public static String convertToName(String title) {
        for (PictureSymbolEnum e : PictureSymbolEnum.values()) {
            if (Objects.equals(title, e.getDesc())) {
                return e.name();
            }
        }
        return null;
    }
}
