package com.example.elva.data.models.health

import java.time.LocalDate
import java.time.LocalDateTime

data class WaterIntake(
    val id: Long = 0,
    val date: LocalDate,
    val amountMl: Int,
    val goalMl: Int = 2000
)

data class CalorieEntry(
    val id: Long = 0,
    val date: LocalDate,
    val calories: Int,
    val mealType: MealType,
    val description: String = "",
    val timestamp: LocalDateTime = LocalDateTime.now()
)

enum class MealType {
    BREAKFAST, LUNCH, DINNER, SNACK
}

data class CalorieGoal(
    val dailyGoal: Int = 2000,
    val protein: Int = 0,
    val carbs: Int = 0,
    val fats: Int = 0
)

data class WeightEntry(
    val id: Long = 0,
    val date: LocalDate,
    val weightKg: Float,
    val notes: String = ""
)

data class SleepEntry(
    val id: Long = 0,
    val date: LocalDate,
    val sleepStart: LocalDateTime,
    val sleepEnd: LocalDateTime,
    val quality: SleepQuality = SleepQuality.GOOD,
    val notes: String = ""
) {
    val durationHours: Float
        get() = java.time.Duration.between(sleepStart, sleepEnd).toMinutes() / 60f
}

enum class SleepQuality {
    POOR, FAIR, GOOD, EXCELLENT
}

data class HealthJournalEntry(
    val id: Long = 0,
    val date: LocalDate,
    val timestamp: LocalDateTime = LocalDateTime.now(),
    val type: JournalType,
    val title: String,
    val content: String,
    val mood: Int = 5 // 1-10 scale
)

enum class JournalType {
    GENERAL, SYMPTOMS, MOOD, EXERCISE, MEDICATION, NOTES
}

