package com.ruoyi.web.modules.architecture.support;

/**
 * 休药期标准：仅知识库同步维度（无发布/下架）。
 */
public final class WithdrawalPeriodStandardRules
{
    private WithdrawalPeriodStandardRules()
    {
    }

    public static boolean isValidKbSyncStatus(Integer kbSyncStatus)
    {
        return kbSyncStatus != null && (kbSyncStatus == 0 || kbSyncStatus == 1);
    }

    /** 仅未同步可编辑 */
    public static boolean canEdit(Integer kbSyncStatus)
    {
        return kbSyncStatus != null && kbSyncStatus == 0;
    }

    /** 仅未同步可删整条 */
    public static boolean canDelete(Integer kbSyncStatus)
    {
        return kbSyncStatus != null && kbSyncStatus == 0;
    }

    /** 仅未同步可同步至知识库 */
    public static boolean canSyncKb(Integer kbSyncStatus)
    {
        return kbSyncStatus != null && kbSyncStatus == 0;
    }

    /** 仅已同步可移出知识库 */
    public static boolean canRemoveKb(Integer kbSyncStatus)
    {
        return kbSyncStatus != null && kbSyncStatus == 1;
    }
}
