commit 05/02/2026
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
package database
|
||||
|
||||
data class LogSemiauto(val index: UInt, val date: String, val time: String, val source: String, val description: String){
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user