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

/**
 * 牦牛疾病预警业务常量与类型校验。
 * <p>
 * {@code warning_type} 枚举与表字段一致；原 type=6（草畜失衡）已迁至
 * {@link GrassLivestockImbalanceWarningRules} / 独立表，本类不再定义。<br>
 * 本地规则分析写入的 {@code data_source} 固定为 {@link #DATA_SOURCE_LOCAL}。
 * </p>
 */
public final class YakDiseaseWarningRules
{
    /** 体温异常 */
    public static final int WARNING_TYPE_TEMP = 1;

    /** 运动量异常 */
    public static final int WARNING_TYPE_STEPS = 2;

    /** 检疫集中预警 */
    public static final int WARNING_TYPE_QUARANTINE = 3;

    /** 诊疗集中预警 */
    public static final int WARNING_TYPE_DIAGNOSIS = 4;

    /** AI 问诊集中预警 */
    public static final int WARNING_TYPE_AI_CONSULT = 5;

    /** 其他 */
    public static final int WARNING_TYPE_OTHER = 9;

    /** 本地健康源分析写入标识 */
    public static final String DATA_SOURCE_LOCAL = "local_analysis";

    public static final String MSG_DATE_RANGE_INVALID = "开始日期不能晚于结束日期";

    public static final String MSG_NOT_FOUND = "预警记录不存在";

    public static final String MSG_FORBIDDEN = "无权查看该预警";

    public static final String MSG_SYNC_IN_PROGRESS = "正在同步，请稍候";

    private YakDiseaseWarningRules()
    {
    }

    /**
     * 是否为当前模块合法的预警类型（不含已迁出的草畜失衡 type=6）。
     */
    public static boolean isValidWarningType(Integer type)
    {
        return type != null && (type == WARNING_TYPE_TEMP || type == WARNING_TYPE_STEPS
                || type == WARNING_TYPE_QUARANTINE || type == WARNING_TYPE_DIAGNOSIS
                || type == WARNING_TYPE_AI_CONSULT || type == WARNING_TYPE_OTHER);
    }
}
