package de.kif.common.model

import kotlinx.serialization.Serializable

@Serializable
data class WorkGroupConstraint(
    val type: ConstraintType,
    val day: Int? = null,
    val time: Int? = null,
    val workGroup: Long? = null,
    val room: Long? = null
)

enum class ConstraintType {

    /**
     * Requires day, permits time, workGroup and room.
     */
    OnlyOnDay,

    /**
     * Requires day, permits time, workGroup and room.
     */
    NotOnDay,

    /**
     * Requires time, optionally allows day, permits workGroup and room.
     */
    OnlyAfterTime,

    /**
     * Requires time, optionally allows day, permits workGroup and room.
     */
    OnlyBeforeTime,

    /**
     * Requires time, optionally allows day, permits workGroup and room.
     */
    ExactTime,

    /**
     * Requires workGroup, permits day, time and room.
     */
    NotAtSameTime,

    /**
     * Requires workGroup, permits day, time and room.
     */
    OnlyAfterWorkGroup,

    /**
     * Requires room, permits day, time and workGroup
     */
    Room
}
