package de.kif.common.model

import de.kif.common.SearchElement
import kotlinx.serialization.Serializable

@Serializable
data class Room(
    override val id: Long? = null,
    val name: String,
    val places: Int,
    val projector: Boolean,
    val internet: Boolean,
    val whiteboard: Boolean,
    val blackboard: Boolean,
    val accessible: Boolean,
    override val createdAt: Long = 0,
    override val updateAt: Long = 0
) : Model {

    override fun createSearch() = SearchElement(
        mapOf(
            "name" to name
        ), mapOf(
            "projector" to projector
        ), mapOf(
            "places" to places.toDouble()
        )
    )
}
