package com.seer.teach.common.enums;

import lombok.Getter;

@Getter
public enum CommentStatusEnum {

    NON_COMMENTED(0, "未评价"),

    COMMENTED(1, "已评价");

    private Integer code;
    private String message;

    CommentStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public static CommentStatusEnum fromCode(int code) {
        for (CommentStatusEnum status : CommentStatusEnum.values()) {
            if (status.getCode() == code) {
                return status;
            }
        }
        return null;
    }

}
