package org.jeecg.modules.statistics.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 设备信息统计表
 * @Author: jeecg-boot
 * @Date:   2021-01-18
 * @Version: V1.0
 */
@Data
@TableName("bu_device_statistics")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="bu_device_statistics对象", description="设备信息统计表")
public class BuDeviceStatistics implements Serializable {
    private static final long serialVersionUID = 1L;
	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**备状态（0-未运行，1-正常，2-预警，3-报警，4-停用）*/
    @Dict(dicCode = "device_status")
    private Integer deviceStatus;
    /**状态更新时间*/
    private Date deviceStatusTime;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**设备id*/
    @ApiModelProperty(value = "设备id")
    @Dict(dictTable = "bu_device",dicText = "device_name",dicCode = "id")
    private String deviceId;
//    /**设备名称*/
//    @Excel(name = "设备名称", width = 20)
//    @ApiModelProperty(value = "设备名称")
//    private String deviceName;
	/**开始时间*/
	@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date openTime;
	/**关闭时间*/
	@Excel(name = "关闭时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "关闭时间")
    private Date closeTime;
//	/**使用时间*/
//	@Excel(name = "使用时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
//	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
//    @ApiModelProperty(value = "使用时间")
//    private Date useTime;
	/**总打开时间（分钟）*/
	@Excel(name = "有效工时", width = 20)
    @ApiModelProperty(value = "总打开时间（分钟）")
    private Double totalOpenTime;
    /**所属部门*/
    @Excel(name = "有效功耗", width = 20)
    @ApiModelProperty(value = "功耗")
    private String sysOrgCode;
//	/**总使用时间（小时）*/
//	@Excel(name = "总使用时间（小时）", width = 15)
//    @ApiModelProperty(value = "总使用时间（小时）")
//    private String totalUseTime;
//	/**总待机时间（小时）*/
//	@Excel(name = "总待机时间（小时）", width = 15)
//    @ApiModelProperty(value = "总待机时间（小时）")
//    private String totalIdleTime;
//    /**月份*/
//    @Excel(name = "月份", width = 15)
//    @ApiModelProperty(value = "月份")
//    private String month;
//    /**年份*/
//    @Excel(name = "年份", width = 15)
//    @ApiModelProperty(value = "年份")
//    private String year;
//    /**天数*/
//    @Excel(name = "天数", width = 15)
//    @ApiModelProperty(value = "天数")
//    private String day;
    @TableField(exist = false)
    private String year;
    @TableField(exist = false)
    private String month;
    @TableField(exist = false)
    private String day;

}
