package database

data class Log(
    val index: ULong,
    val datenya: String,
    val timenya: String,
    val machine: String,
    val description : String
) {
    @Suppress("unused")
    companion object {

        fun ValidDate(date: String): Boolean {
            // Simple date validation (DD/MM/YYYY)
            val regex = Regex("""^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/\d{4}$""")
            return regex.matches(date)
        }

        fun validTime(time: String): Boolean {
            // Simple time validation (HH:MM:SS)
            val regex = Regex("""^(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$""")
            return regex.matches(time)
        }
    }
}
