package com.haha.common.constant;

/**
 * 公告相关常量
 */
public final class AnnouncementConstants {

    private AnnouncementConstants() {}

    // ==================== 公告状态 ====================

    /** 草稿状态 */
    public static final int STATUS_DRAFT = 0;

    /** 已发布状态 */
    public static final int STATUS_PUBLISHED = 1;

    /** 已下线状态 */
    public static final int STATUS_OFFLINE = 2;

    // ==================== 置顶状态 ====================

    /** 不置顶 */
    public static final int NOT_TOP = 0;

    /** 置顶 */
    public static final int IS_TOP = 1;

    /**
     * 获取公告状态描述
     */
    public static String getStatusDesc(int status) {
        return switch (status) {
            case STATUS_DRAFT -> "草稿";
            case STATUS_PUBLISHED -> "已发布";
            case STATUS_OFFLINE -> "已下线";
            default -> "未知";
        };
    }
}
