package cn.stylefeng.team.portal.modular.management.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

@Getter
public enum PortalNewsExceptionEnum implements AbstractExceptionEnum {

    PORTAL_NEWS_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10001", "查询结果不存在"),

    PORTAL_NEWS_NAME_REPEAT(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10002", "标题名称重复，请重新输入名称"),

    LINK_URL_IS_EMPTY(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10003", "外链新闻，需要传递链接url"),

    NEWS_CONTENT_IS_EMPTY(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10004", "文章新闻，需要传递文章内容"),

    NEWS_IS_NOT_PUBLISH(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10005", "文章未发布，请联系管理员");

    private final String errorCode;

    private final String userTip;

    PortalNewsExceptionEnum(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }

}
