package com.nantian.cloud.jly.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * <p>
 * 能源计量器具基本信息
 * </p>
 *
 * @author scott
 * @since 2020-08-07
 */
@Data
@TableName("configure_device")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "主要用能设备")
public class ConfigureDevice extends Model<ConfigureDevice> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id")
    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 社会行用统一编码
     */
    @ApiModelProperty(value = "社会行用统一编码")
    private String enterpriseCode;

    @TableField(exist = false)
    private String enterpriseName;

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

    /**
     * 设备编号
     */
    @ApiModelProperty(value = "设备编号")
    private String deviceNo;

    /**
     * 规格型号
     */
    @ApiModelProperty(value = "规格型号")
    private String model;

    /**
     * 安装地点
     */
    @ApiModelProperty(value = "安装地点")
    private String location;

    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    private String dept;


    /**
     * 设备类型
     */
    @ApiModelProperty(value = "设备类型")
    private String deviceType;

    /**
     * 启用日期
     */
    //@TableField("currentState")
    @ApiModelProperty(value = "启用日期")
    private String usingDate;


    /**
     * 运行情况
     */
    //@TableField("serNo")
    @ApiModelProperty(value = "运行情况")
    private String currentState;

    /**
     * 生产厂家
     */
    @ApiModelProperty(value = "生产厂家")
    private String manufacturer;

    /**
     * 能源种类
     */
    @ApiModelProperty(value = "能源种类")
    private String energyCode;

    /**
     * 能源消耗量或功率
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "能源消耗量或功率")
    private String energyValue;

    /**
     * 工序编码+工序单元编码
     */
    @ApiModelProperty(value = "工序编码+工序单元编码")
    private String processUnitCode;

    /**
     * 状态
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "状态")
    private String state;


    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Integer userid;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 注销状态
     */
    @ApiModelProperty(value = "注销状态（1：未删除，4：已删除）")
    private String delFlag;

    /**
     * 部门id
     */
    @ApiModelProperty(value = "部门id")
    private Integer deptId;

    /**
     * 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
