This commit is contained in:
2024-11-02 18:31:53 +01:00
parent f174497e70
commit 596fa67272
8 changed files with 135 additions and 21 deletions

View File

@ -0,0 +1,27 @@
package it.danieleverducci.lunatracker.entities
import java.util.Date
class LunaEvent(
val type: LunaEventType,
val quantity: Int? = null
){
val time: Long // In unix time (seconds since 1970)
init {
time = System.currentTimeMillis() / 1000
}
override fun toString(): String {
return "${type.toString()} qty: $quantity time: ${Date(time * 1000)}"
}
}
enum class LunaEventType {
BABY_BOTTLE,
BREASTFEEDING_LEFT_NIPPLE,
BREASTFEEDING_BOTH_NIPPLE,
BREASTFEEDING_RIGHT_NIPPLE,
DIAPERCHANGE_POO,
DIAPERCHANGE_PEE,
}