package de.kif.common.model

import kotlinx.serialization.Serializable

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

enum class ConstraintType {

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

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

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

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

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

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