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

import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 牦牛疾病预警实体，对应表 {@code biz_yak_disease_warning}。
 * <p>
 * 管理端 / 移动端列表与详情的查询载体；写入由健康源规则分析或历史同步产生。<br>
 * 草畜失衡预警已拆至 {@code biz_grass_livestock_imbalance_warning}，本表不再使用 type=6。
 * </p>
 */
public class BizYakDiseaseWarning extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 牦牛编号 / 耳标（可空；集中预警可能不绑单牛） */
    private String yakNo;

    /** 映射成功时的 {@code biz_pasture.id} */
    private Long pastureId;

    /** 牧场名称（冗余展示；未匹配系统牧场时保留第三方名） */
    private String pastureName;

    /** 预警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date alertTime;

    /** 预警信息（自然语言全文） */
    private String alertMessage;

    /**
     * 预警类型：1体温 2运动量 3检疫集中 4诊疗集中 5AI问诊 9其他；
     * 见 {@link com.ruoyi.web.modules.industryservice.support.YakDiseaseWarningRules}
     */
    private Integer warningType;

    /** 实测值描述，如 {@code 39.8℃} */
    private String measuredValue;

    /** 参考范围描述 */
    private String referenceRange;

    /** 设备 / 耳标编号（第三方有则存；也可作业务去重键） */
    private String deviceNo;

    /** 指标采集时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date collectTime;

    /** 牦牛头像 URL（移动端展示） */
    private String yakAvatarUrl;

    /** 数据来源，如 {@code local_analysis} */
    private String dataSource;

    /** 本条最近同步 / 分析时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastSyncTime;

    /** 列表筛选：预警开始日 yyyy-MM-dd */
    private String startDate;

    /** 列表筛选：预警结束日 yyyy-MM-dd */
    private String endDate;

    /** 查询注入：预警时间下界 */
    private Date alertTimeBegin;

    /** 查询注入：预警时间上界 */
    private Date alertTimeEnd;

    /** 数据权限：可见牧场 ID 列表；null 表示不限制 */
    private List<Long> allowedPastureIds;

    /** 详情附加：关联档案 ID */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long yakAssetId;

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public String getYakNo()
    {
        return yakNo;
    }

    public void setYakNo(String yakNo)
    {
        this.yakNo = yakNo;
    }

    public Long getPastureId()
    {
        return pastureId;
    }

    public void setPastureId(Long pastureId)
    {
        this.pastureId = pastureId;
    }

    public String getPastureName()
    {
        return pastureName;
    }

    public void setPastureName(String pastureName)
    {
        this.pastureName = pastureName;
    }

    public Date getAlertTime()
    {
        return alertTime;
    }

    public void setAlertTime(Date alertTime)
    {
        this.alertTime = alertTime;
    }

    public String getAlertMessage()
    {
        return alertMessage;
    }

    public void setAlertMessage(String alertMessage)
    {
        this.alertMessage = alertMessage;
    }

    public Integer getWarningType()
    {
        return warningType;
    }

    public void setWarningType(Integer warningType)
    {
        this.warningType = warningType;
    }

    public String getMeasuredValue()
    {
        return measuredValue;
    }

    public void setMeasuredValue(String measuredValue)
    {
        this.measuredValue = measuredValue;
    }

    public String getReferenceRange()
    {
        return referenceRange;
    }

    public void setReferenceRange(String referenceRange)
    {
        this.referenceRange = referenceRange;
    }

    public String getDeviceNo()
    {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo)
    {
        this.deviceNo = deviceNo;
    }

    public Date getCollectTime()
    {
        return collectTime;
    }

    public void setCollectTime(Date collectTime)
    {
        this.collectTime = collectTime;
    }

    public String getYakAvatarUrl()
    {
        return yakAvatarUrl;
    }

    public void setYakAvatarUrl(String yakAvatarUrl)
    {
        this.yakAvatarUrl = yakAvatarUrl;
    }

    public String getDataSource()
    {
        return dataSource;
    }

    public void setDataSource(String dataSource)
    {
        this.dataSource = dataSource;
    }

    public Date getLastSyncTime()
    {
        return lastSyncTime;
    }

    public void setLastSyncTime(Date lastSyncTime)
    {
        this.lastSyncTime = lastSyncTime;
    }

    public String getStartDate()
    {
        return startDate;
    }

    public void setStartDate(String startDate)
    {
        this.startDate = startDate;
    }

    public String getEndDate()
    {
        return endDate;
    }

    public void setEndDate(String endDate)
    {
        this.endDate = endDate;
    }

    public Date getAlertTimeBegin()
    {
        return alertTimeBegin;
    }

    public void setAlertTimeBegin(Date alertTimeBegin)
    {
        this.alertTimeBegin = alertTimeBegin;
    }

    public Date getAlertTimeEnd()
    {
        return alertTimeEnd;
    }

    public void setAlertTimeEnd(Date alertTimeEnd)
    {
        this.alertTimeEnd = alertTimeEnd;
    }

    public List<Long> getAllowedPastureIds()
    {
        return allowedPastureIds;
    }

    public void setAllowedPastureIds(List<Long> allowedPastureIds)
    {
        this.allowedPastureIds = allowedPastureIds;
    }

    public Long getYakAssetId()
    {
        return yakAssetId;
    }

    public void setYakAssetId(Long yakAssetId)
    {
        this.yakAssetId = yakAssetId;
    }
}
