package com.ys.bdtp.cad.types

import android.os.Parcel
import android.os.Parcelable

/**
 * 可调节空间空间 item 类
 *
 */
class TunableSpace() :Parcelable {
    /** 轮廓线  */
    var outLine: ArrayList<ArrayList<ArrayList<PointZ>>> = ArrayList()
    var name: String? = null
    var floorName: String? = null
    var floorId: String? = null
    var objectEntity: String? = null
    var isShow: Boolean = false

    /**
     *  {
    "name": "有结构核查任务",
    "code": "01"
    },
    {
    "name": "有结构问题",
    "code": "02"
    },
    {
    "name": "结构核查完毕",
    "code": "03"
    },
    {
    "name": "有现场勘测任务",
    "code": "04"
    },
    {
    "name": "已完成勘测任务",
    "code": "05"
    }
     */
    var jobStatus: String = ""
    var id: String? = null
    var localName: String? = null

    constructor(parcel: Parcel) : this() {
        name = parcel.readString()
        jobStatus = parcel.readString() ?: ""
        id = parcel.readString()
        localName = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(name)
        parcel.writeString(jobStatus)
        parcel.writeString(id)
        parcel.writeString(localName)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<TunableSpace> {
        override fun createFromParcel(parcel: Parcel): TunableSpace {
            return TunableSpace(parcel)
        }

        override fun newArray(size: Int): Array<TunableSpace?> {
            return arrayOfNulls(size)
        }
    }
}