Files
AAS_NewGeneration/src/database/LogSemiauto.kt
2026-02-05 16:20:40 +07:00

19 lines
689 B
Kotlin

package database
import java.time.LocalDate
import java.time.LocalTime
import java.time.format.DateTimeFormatter
data class LogSemiauto(val index: ULong, val date: String, val time: String, val source: String, val description: String){
override fun toString(): String {
return "$date $time [$source] $description"
}
companion object{
fun NewLog(source: String, description: String): LogSemiauto {
val date = LocalDate.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy"))
val time = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss"))
return LogSemiauto(0u, date, time, source, description)
}
}
}