package com.dayou.enums;

import org.springframework.util.StringUtils;

/**
 * 类说明：
 *
 * @author: wucl
 * @since: 2022/12/30
 * created with IntelliJ IDEA.
 */
public enum ItemStateEnum {

    PENDING("进行中"),
    COMPLETED("已完成"),
    UNPLAYED("未开始")
    ;

    private String name;

    ItemStateEnum(String name) {
        this.name = name;
    }

    public static ItemStateEnum getName(String name) {
        if ("进行中".equals(name)){
            return PENDING;
        }
        if ("已完成".equals(name)){
            return COMPLETED;
        }if ("未开始".equals(name)){
            return UNPLAYED;
        }
        return null;
    }

    public String getName() {
        return name;
    }
}
