package com.yzt.airconditionersystem.bean;

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 java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName device
 */
@TableName(value ="device")
@Data
public class Device implements Serializable {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 公司名称
     */
    @TableField(value = "company_name")
    private String companyName;

    /**
     * 网关设备id
     */
    @TableField(value = "gateway_id")
    private String gatewayId;

    /**
     * 空调名称+从机id,即CK-1_slave1，设备名_从机站号
     */
    @TableField(value = "device_id")
    private String deviceId;

    /**
     * plc设备的通信状态（zlan网关这里默认为1，云垦科技网关0为未连接通讯，1为连接通讯）
     */
    @TableField(value = "device_state")
    private Integer deviceState;

    /**
     * 变量前缀
     */
    @TableField(value = "prefix")
    private String prefix;

    /**
     * 时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime time;

    @TableField(exist = false)
    private DeviceData deviceData;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}