package org.jeecg.modules.device.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.jeecgframework.poi.excel.annotation.ExcelIgnore;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * @Description: 设备信息表
 * @Author: jeecg-boot
 * @Date:   2020-12-11
 * @Version: V1.0
 */
@Data
@TableName("bu_device")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="bu_device对象", description="设备信息表")
public class BuDevice implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @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;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**设备编号*/
	@Excel(name = "设备编号", width = 15)
    @ApiModelProperty(value = "设备编号")
    private String deviceCode;
    /**设备类型*/
    @Excel(name = "设备类型", width = 15,dicCode = "device_use")
    @ApiModelProperty(value = "设备类型")
    @Dict(dictTable = "bu_device_type",dicText = "type_name",dicCode = "id")
    private String deviceTypeId;
	/**设备名称*/
	@Excel(name = "设备名称", width = 15)
    @ApiModelProperty(value = "设备名称")
    private String deviceName;
	/**规格型号*/
	@Excel(name = "规格型号", width = 15)
    @ApiModelProperty(value = "规格型号")
    private String typeId;
//	/**运行状态*/
//	@Excel(name = "运行状态", width = 15,dicCode = "device_use")
//    @ApiModelProperty(value = "运行状态")
//    @Dict(dicCode = "device_use")
//    private String deviceUse;
	/**设备用途*/
	@Excel(name = "设备用途", width = 15)
    @ApiModelProperty(value = "设备用途")
    private String usageId;
	/**安装时间*/
	@Excel(name = "安装时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "安装时间")
    private Date setupTime;
	/**负责人id*/
	@Excel(name = "负责人", width = 15,dictTable = "sys_user",dicText = "realname",dicCode = "username")
    @ApiModelProperty(value = "负责人")
    @Dict(dictTable = "sys_user",dicText = "realname",dicCode = "username")
    private String directorId;
	/**供应商id*/
	@Excel(name = "供应商", width = 15,dictTable = "bu_supplier",dicText = "name",dicCode = "id")
    @ApiModelProperty(value = "供应商id")
    @Dict(dictTable = "bu_supplier",dicText = "name",dicCode = "id")
    private String supplierId;
	/**安装地点*/
	@Excel(name = "安装地点", width = 15)
    @ApiModelProperty(value = "安装地点")
    @Dict(dictTable = "bu_device_location",dicText = "title",dicCode = "id")
    private String location;
    @ExcelIgnore
    @TableField(exist = false)
    private String latlng;
	/**启用时间*/
	@Excel(name = "启用时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "启用时间")
    private Date enableTime;
	/**二维码*/
//	@Excel(name = "二维码", width = 15)
    @ApiModelProperty(value = "二维码")
    private String code;
    /**所属检修线*/
    @Excel(name = "所属检修线", width = 15)
    @ApiModelProperty(value = "所属检修线")
    private String repairLine;

    /**图片*/
//    @Excel(name = "图片", width = 15)
    @ApiModelProperty(value = "图片")
    private String img;
    /**额定功率（kW）*/
    @Excel(name = "额定功率（kW）", width = 15)
    @ApiModelProperty(value = "额定功率（kW）")
    private double ratedPower;
    /**包机人*/
    @Excel(name = "包机人", width = 15)
    @Dict(dictTable = "sys_user",dicText = "realname",dicCode = "username")
    @ApiModelProperty(value = "包机人")
    private String userJi;
    /**包修人*/
    @Excel(name = "包修人", width = 15)
    @Dict(dictTable = "sys_user",dicText = "realname",dicCode = "username")
    @ApiModelProperty(value = "包修人")
    private String userXiu;
    /**设备token*/
    @Excel(name = "设备token", width = 15)
    @ApiModelProperty(value = "设备token")
    private String deviceToken;

    @TableField(exist = false)
    private String status;
    @TableField(exist = false)
    private Integer count;

    @TableField(exist = false)
    private List<Part> partList;

    @TableField(exist = false)
    private String sensorId;
}
