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_user_bind")
@EnableEntityEvent
public class DeviceUserBindEntity 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("用户Id")
    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Comment("设备id")
    @Column(name = "device_id", nullable = false)
    private Long deviceId;
    
    @Comment("三方设备id")
    @Column(name = "other_device_id", nullable = true)
    private String otherDeviceId;
    
    @Comment("涂鸦空间id")
    @Column(name = "space_id", nullable = true)
    private Long spaceId;

    @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("是否为主设备 1：是 0：不是")
    @Column(name = "is_main", nullable = false)
    private Integer isMain;

    @Comment("绑定设备名称（用户命名）")
    @Column(name = "bind_name", length = 100)
    private String bindName;

    @Comment("国家")
    @Column(name = "country", length = 100)
    private String country;

    @Comment("省")
    @Column(name = "province", length = 100)
    private String province;

    @Comment("市")
    @Column(name = "city", length = 100)
    private String city;

    @Comment("县、区")
    @Column(name = "county", length = 100)
    private String county;

    @Comment("乡镇")
    @Column(name = "village", length = 100)
    private String village;

    @Comment("乡镇以下地址")
    @Column(name = "address", length = 200)
    private String address;
    @Comment("分类字段名称")
    @Column(name = "category_code", length = 20, nullable = false)
    private String categoryCode;

}