package com.huimv.env.input.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2024-05-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("env_data")
public class EnvData implements Serializable {

    private static final long serialVersionUID = 1L;

    public EnvData() {
    }

    public EnvData(String terminalPortCode, String terminalCode, String gatwayCode, String voltage, String electricCurrent, String temp, String leakageValue, Integer activePower, Integer reactivePower, Integer apparentPower, int heightTempWarning, int chargingWarning, int leakageWarning, String originalData, Date createTime) {

        this.terminalPortCode = terminalPortCode;
        this.terminalCode = terminalCode;
        this.gatwayCode = gatwayCode;
        this.voltage = voltage;
        this.electricCurrent = electricCurrent;
        this.temp = temp;
        this.leakageValue = leakageValue;
        this.activePower = activePower;
        this.reactivePower = reactivePower;
        this.apparentPower = apparentPower;
        this.heightTempWarning = heightTempWarning;
        this.chargingWarning = chargingWarning;
        this.leakageWarning = leakageWarning;
        this.originalData = originalData;
        this.createTime = createTime;
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String terminalPortCode;

    private String terminalCode;

    private String gatwayCode;

    /**
     * 电压有效值
     */
    private String voltage;

    /**
     * 电流有效值
     */
    private String electricCurrent;

    private String temp;

    /**
     * 漏电值
     */
    private String leakageValue;

    /**
     * 有功功率
     */
    private Integer activePower;

    /**
     * 无功功率
     */
    private Integer reactivePower;

    /**
     * 视在功率
     */
    private Integer apparentPower;

    /**
     * 高温报警 0 无
     */
    private int heightTempWarning;

    /**
     * 充电报警 0 无
     */
    private int chargingWarning;

    /**
     * 漏电报警 0 无
     */
    private int leakageWarning;

    private String originalData;

    private Date createTime;


}
