package com.ys.bdtp.adm.mvvm.model.db.entity.task

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.ys.bdtp.adm.mvvm.model.db.entity.BaseEntity
import com.google.gson.JsonElement

/**
 * 描述设备的服务区域
 */
@Entity(tableName = "serve_area")
data class ServeAreaEntity(
    @PrimaryKey @ColumnInfo(name = "id") override val id: String,
    @ColumnInfo(name = "project_id") override val projectId: String,
    @ColumnInfo(name = "building_id") override val buildingId: String,
    @ColumnInfo(name = "floor_id") override val floorId: String,
    @ColumnInfo(name = "state") override var state: Int = -1,
    @ColumnInfo(name = "valid") override var valid: Int = 1,
    @ColumnInfo(name = "ts") override val ts: Long = 0L,
    @ColumnInfo(name = "obj_id") var objId: String? = "",            // 服务该区域的设备id
    @ColumnInfo(name = "geom_type") var geomType: String? = "",      // 服务区域的几何类型(polygon:多边形|circle:圆形|ellipse:椭圆)
    @ColumnInfo(name = "geom") var geom: JsonElement? = null,        // 服务区域的轮廓几何信息(polygon对应xy坐标数组, circle和ellipse对应对象(圆心半径))
    @ColumnInfo(name = "serve_type") var serveType: String? = "",    // 服务的类型，照明回路等，暂时为空
    @ColumnInfo(name = "remark") var remark: String? = "",           // 描述信息
) : BaseEntity