package com.zcxk.dto.alarm;

import com.zcxk.common.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 数据报警查询字段
 * @author lihui
 * @version V1.0
 * @date 2021/5/31
 **/
@Data
@Api("数据报警查询字段")
public class DataAlarmDto implements Serializable {

    @ApiModelProperty(value = "名称")
    private String alarmName;

    @ApiModelProperty(value = "开始时间")
    private String beginTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;

    @ApiModelProperty(value = "页码")
    private int pageNum;

    @ApiModelProperty(value = "大小")
    private int pageSize;

    public String getBeginTime(){
        return StringUtils.isEmpty(beginTime) ? null : beginTime + " 00:00:00";
    }

    public String getEndTime(){
        return StringUtils.isEmpty(endTime) ? null : endTime + " 23:59:59";
    }
}
