package com.persagy.server.datacenter.models.entities.objects

import com.alibaba.fastjson.annotation.JSONField
import com.persagy.server.datacenter.models.entities.assistant.PointImage
import com.persagy.server.datacenter.models.entities.base.RBaseInfo
import com.persagy.service.models.annotations.SCascade
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 点位标签信息实体类
 *
 * @ 付国宝
 */
@ApiModel(description = "点位标签信息实体类")
@Table(name = "location_point")
class LocationPoint : RBaseInfo() {

    /** 点位标签ID */
    @ApiModelProperty(value = "点位标签ID")
    @Id
    @Column(name = "id")
    @JSONField(name = "Id")
    var id: String? = null

    /** 本地编码 */
    @ApiModelProperty(value = "本地编码")
    @Column(name = "local_id")
    @JSONField(name = "LocalId")
    var localId: String? = null

    /** 项目ID */
    @ApiModelProperty(value = "项目ID")
    @Column(name = "project_id")
    @JSONField(name = "ProjectId")
    var projectId: String? = null

    /** 建筑ID */
    @ApiModelProperty(value = "建筑ID")
    @Column(name = "build_id")
    @JSONField(name = "BuildId")
    var buildId: String? = null

    /** 楼层ID */
    @ApiModelProperty(value = "楼层ID")
    @Column(name = "floor_id")
    @JSONField(name = "FloorId")
    var floorId: String? = null

    /** BimId编码 */
    @ApiModelProperty(value = "BimId编码")
    @Column(name = "bim_id")
    @JSONField(name = "BimId")
    var bimId: String? = null

    /**  */
    @ApiModelProperty(value = "")
    @Column(name = "beacon_id")
    @JSONField(name = "BeaconId")
    var beaconId: String? = null

    /** 名称 */
    @ApiModelProperty(value = "名称")
    @Column(name = "name")
    @JSONField(name = "Name")
    var name: String? = null

    /** 位置 */
    @ApiModelProperty(value = "位置")
    @Column(name = "position")
    @JSONField(name = "Position")
    var position: String? = null

    /** 信息类型 */
    @ApiModelProperty(value = "信息类型")
    @Column(name = "type")
    @JSONField(name = "Type")
    var type: Int? = null

    /** X坐标 */
    @ApiModelProperty(value = "X坐标")
    @Column(name = "x")
    @JSONField(name = "X")
    var x: Double? = 0.0

    /** Y坐标 */
    @ApiModelProperty(value = "Y坐标")
    @Column(name = "y")
    @JSONField(name = "Y")
    var y: Double? = 0.0

    /**  */
    @ApiModelProperty(value = "")
    @Column(name = "space_id")
    @JSONField(name = "SpaceId")
    var spaceId: String? = null

    /** 备注 */
    @ApiModelProperty(value ="")
    @Column(name = "note")
    @JSONField(name = "Note")
    var note: String? = null

    /** 图片信息 */
    @ApiModelProperty(value ="图片信息")
    @JSONField(name = "ImageList")
    @SCascade(table="scanbuilding.image", idColumn="object_id", childIdColumn="id")
    var imageList: ArrayList<PointImage>? = null

//    /** 图片信息 */
//    @ApiModelProperty(value ="图片信息")
//    @JSONField(name = "videoList")
//    @SCascade(table="scanbuilding.image", idColumn="object_id", childIdColumn="id")
//    var videoList: ArrayList<PointImage>? = null

//    /** 图片列表信息 */
//    @ApiModelProperty(value ="图片列表信息")
//    @JSONField(name = "ImageLists")
//    @Column(name = "image_list")
//    var imageLists: HashMap<String,PointImage>? = null


} // Class LocationPoint