LightSensorAlarmRequest.java 1.6 KB
package cn.com.glsx.schedulerjob.model;

import java.io.Serializable;
import java.util.List;

/**
 * 光敏报警接口请求参数对象
 * 对应文档3.7节:设备上报指定日期的光敏报警数据(含报警次数、位置等)
 */
public class LightSensorAlarmRequest implements Serializable {

    /**
     * 数据所属日期
     * 必填:是
     * 格式:yyyy-MM-dd
     * 对应文档3.7.2 currentDay字段
     */
    private String currentDay;

    /**
     * 光敏报警列表
     * 必填:是
     * 类型:Array(List)
     * 注:文档原数组无key,规范新增alarmList作为数组key,设备侧需按此调整
     * 对应文档3.7.2 alarmList字段
     */
    private List<LightSensorAlarmItem> alarmList;

    // 无参构造
    public LightSensorAlarmRequest() {
    }

    // 全参构造
    public LightSensorAlarmRequest(String currentDay, List<LightSensorAlarmItem> alarmList) {
        this.currentDay = currentDay;
        this.alarmList = alarmList;
    }

    // Getter & Setter
    public String getCurrentDay() {
        return currentDay;
    }

    public void setCurrentDay(String currentDay) {
        this.currentDay = currentDay;
    }

    public List<LightSensorAlarmItem> getAlarmList() {
        return alarmList;
    }

    public void setAlarmList(List<LightSensorAlarmItem> alarmList) {
        this.alarmList = alarmList;
    }

    // toString
    @Override
    public String toString() {
        return "LightSensorAlarmRequest{" +
                "currentDay='" + currentDay + '\'' +
                ", alarmList=" + alarmList +
                '}';
    }

}