/**
 * Copyright 2019 DH
 * All right reserved.
 * 项目名称: 大恒泰山系统
 * 创建日期:2023/6/15
 */
package org.springblade.modules.business.data.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/***
 * Date:2023/6/15
 * Title:文件所属模块（必须填写）
 * Description：对本文件的详细描述，原则上不能少于30字
 * @author dylan
 * @version 1.0
 * Remark：认为有必要的其他信息
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("data_rtu_realtime_status")
public class RtuRealTimeStatusEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 租户ID
     */
    @ApiModelProperty("租户ID")
    private String tenantId;

    /**
     * 测站编码
     */
    @ApiModelProperty("测站编码")
    private String rtuCode;

    /**
     * 采集时间
     */
    @ApiModelProperty("采集时间")
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date collectTime;

    /**
     * 上报时间
     */
    @ApiModelProperty("上报时间")
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date upTime;


    /**
     * 数据库入库时间
     */
    @ApiModelProperty("入库时间")
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date pickTime;

    @ApiModelProperty("经度")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double lng;

    @ApiModelProperty("纬度")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double lat;

    @ApiModelProperty("信号强度")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double dtuSignal;

    @ApiModelProperty("电源电压")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double voltage;

    @ApiModelProperty("RTU温度")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double temperature;

    @ApiModelProperty("设备状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer rtuStatus;

    @ApiModelProperty("异常值")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer rtuError;

    @ApiModelProperty("电池状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String batteryStatus;

    @ApiModelProperty("充电状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String batteryBatteryIn;

    @ApiModelProperty("放电状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String batteryBatteryOut;

    @ApiModelProperty("电池电量 ,百分比")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double batteryPower;

    @ApiModelProperty("电池温度")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double batteryTemperature;

    @ApiModelProperty("太阳能板电压")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double sunPowerVoltage;

    @ApiModelProperty("太阳能板电流")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Double sunPowerElectric;

    /**
     * 交流电充电报警 0 正常 ，1停电
     */
    @ApiModelProperty("交流电充电报警")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer acChargeStatus;


    /**
     * 电池电压报警 0 正常 ，1报警
     */
    @ApiModelProperty("电池电压报警")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer batteryVoltageStatus;


    @ApiModelProperty("水位超限报警状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer waterLevelOverStatus;

    @ApiModelProperty("流量超限报警状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer waterFlowOverStatus;

    @ApiModelProperty("水质超限报警状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer waterQualityStatus;

    @ApiModelProperty("流量仪表状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer waterFlowSensorStatus;

    @ApiModelProperty("水位仪表状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer waterLevelSensorStatus;

    @ApiModelProperty("终端箱门状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer boxDoorStatus;

    @ApiModelProperty("存储器状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer rtuMemoryStatus;

    @ApiModelProperty("IC 卡功能 ")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer rtuIcCardStatus;

    @ApiModelProperty("水泵工作状态 ")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer waterPumpStatus;

    @ApiModelProperty("剩余水量报警 ")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer waterRemainOverStatus;

    @ApiModelProperty("上报索引")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String datagramChannelIndex;
}
