package com.qmth.distributed.print.business.enums;

import java.util.Objects;

/**
 * @Description: 生成原卷动态轨迹图 enum
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/11/3
 */
public enum ImageTrajectoryEnum {

    PREVIEW("预览"),

    DOWNLOAD("下载");

    private String title;

    private ImageTrajectoryEnum(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

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