package com.zcxk.charge.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zcxk.core.utils.encrypt.Md5;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @ClassName ReportWaterPumpStateEntity
 * @Description: 水泵运行状态报表
 * @Author lihui
 * @Date 2021/4/20
 * @Version V1.0
 **/
@Data
@TableName("sms_report_water_pump_state")
public class ReportWaterPumpStateEntity {

    private static final long serialVersionUID = 1L;

	@TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "运行状态 ：1-停止，0-运行")
	private Integer state;

    @ApiModelProperty(value = "运行状态开始时间")
    private Date stateBeginTime;

    @ApiModelProperty(value = "运行状态结束时间")
    private Date stateEndTime;

    @ApiModelProperty(value = "租户标识")
    private String tenantId;

    @ApiModelProperty(value = "设备信息")
    private Integer deviceId;

    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "设备编号")
    private String deviceCode;

    @ApiModelProperty(value = "设备属性")
    private Long attributeId;

    @ApiModelProperty(value = "设备属性名称")
    private String attributeName;

    @ApiModelProperty(value = "年")
    private Integer year;

    @ApiModelProperty(value = "月")
    private Integer month;

    @ApiModelProperty(value = "日")
    private Integer day;

    @ApiModelProperty(value = "md5查询")
    private String md5Query;

    @ApiModelProperty(value = "创建日期")
    private Date dateCreate;

    @ApiModelProperty(value = "更新日期")
    private Date dateUpdate;

    @ApiModelProperty(value = "ip机器")
    private String ip;

    public String getMd5(){
        return Md5.hash(this.tenantId + this.deviceId + this.deviceCode + this.attributeId + this.year + this.month);
    }


}
