package com.younike.system.enums;

import com.younike.common.utils.StringUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单评价状态枚举类
 * @author Dail
 */
@AllArgsConstructor
@Getter
public enum CommentStateEnum {

    PENDING_COMMENT("001", "待评价"),
    COMMENTED("002", "已评价");


    private String code;

    private String desc;

    public static String getDescription(String code) {
        for (CommentStateEnum item : CommentStateEnum.values()) {
            if(item.getCode().equals(code)){
                return item.getDesc();
            }
        }
        return StringUtils.EMPTY;
    }
}
