package com.qiuguo.iot.data.entity.device;
import org.hswebframework.ezorm.rdb.mapping.annotation.Comment;
import org.hswebframework.web.crud.annotation.EnableEntityEvent;
import org.hswebframework.web.api.crud.entity.GenericEntity;
import javax.persistence.Column;
import javax.persistence.Table;import lombok.Data;
import java.util.Date;
/**
* <p>
* </p>*设备信息表
* @author wulin
* @since 2023-09-05
*/

@Data
@Comment("设备信息表")
@Table(name = "device_info")
@EnableEntityEvent
public class DeviceInfoEntity extends GenericEntity<Long> {
    @Comment("id")
    @Column(name = "id", length = 11, nullable = false, unique = true)
    private Long id;

    @Comment("是否删除：0 否 1 删除")
    @Column(name = "is_delete", nullable = false)
    private Integer isDelete;

    @Comment("创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @Comment("修改时间")
    @Column(name = "modify_time")
    private Date modifyTime;

    @Comment("批次号")
    @Column(name = "batch_id", nullable = false)
    private Long batchId;

    @Comment("设备名称")
    @Column(name = "name", length = 100, nullable = false)
    private String name;

    @Comment("设备序列号")
    @Column(name = "sn", length = 100, nullable = false)
    private String sn;

    @Comment("设备密钥")
    @Column(name = "key", length = 100, nullable = false)
    private String key;

    @Comment("设备状态：0：开启，1待机、关闭（在线）")
    @Column(name = "status", length = 5, nullable = false)
    private Integer status;

    @Comment("蓝牙地址")
    @Column(name = "bt_mac", length = 50)
    private String btMac;

    @Comment("wifi地址")
    @Column(name = "wifi_mac", length = 50)
    private String wifiMac;

    @Comment("当前固件版本")
    @Column(name = "firmware_version", length = 10)
    private String firmwareVersion;

    @Comment("设备类型：0 果Box 1智能插座 2智能大灯 3智能窗帘驱动 4智能窗户关闭 5智能台灯 6智能桌子 7智能椅子 8智能风扇 9智能空调（遥控器） 10智能冰箱 11智能洗碗机 12智能电热水器 13温度传感器 14空气质量传感器 15光线传感器 16雨量传感器 17闭门器")
    @Column(name = "device_type", nullable = false)
    private Integer deviceType;

    @Comment("是否在线 0：不在线 1在线")
    @Column(name = "on_line")
    private Integer onLine;

    @Comment("最后一次上线时间")
    @Column(name = "last_on_line_time")
    private Date lastOnLineTime;

    @Comment("通讯协议类型：0：WebSocket 1：MQTT 2：TCP 3：UDP 4：HTTP")
    @Column(name = "protocol_type", nullable = false)
    private Integer protocolType;

    @Comment("运行模式id")
    @Column(name = "operating_mode_id", nullable = false)
    private Long operatingModeId;

    @Comment("升级模式：0 无模式 1 自动升级")
    @Column(name = "ota_type", nullable = false)
    private Integer otaType;

    @Comment("自动升级开始时间段")
    @Column(name = "ota_start_time")
    private Date otaStartTime;

    @Comment("自动升级结束时间段")
    @Column(name = "ota_end_time")
    private Date otaEndTime;

    @Comment("生产时间")
    @Column(name = "factory_time")
    private Date factoryTime;

    @Comment("销售时间")
    @Column(name = "sale_time")
    private Date saleTime;

}