package org.lym.pom.repository.mongo.enums;

import lombok.Getter;
import org.lym.pom.repository.mongo.Comment;
import org.shoulder.core.dictionary.model.NameAsIdDictionaryItemEnum;

/**
 * 评论类型枚举：文本、Markdown、带图片、文件附件、分享链接等
 *
 * @see Comment#type
 * @author lym
 */
@Getter public enum CommentTypeEnum implements NameAsIdDictionaryItemEnum<CommentTypeEnum> {
    TEXT(Comment.Type.TEXT),
    MARKDOWN(Comment.Type.MARKDOWN),
    WITH_IMAGE(Comment.Type.WITH_IMAGE),
    FILE_ATTACH(Comment.Type.FILE_ATTACH),
    SHARE_LINK(Comment.Type.SHARE_LINK);

    private final String storageName;

    CommentTypeEnum(String storageName) {
        this.storageName = storageName;
    }
    @Override
    public String getItemId() {
        return storageName;
    }

}
