package com.aletheia.app.model

data class ReadingNote(
    val id: Long = 0L,
    val bookId: Long,
    val cfi: String?,
    val progress: Double,
    val currentPage: Int,
    val totalPages: Int,
    val chapterTitle: String?,
    val selectedText: String?,
    val noteText: String,
    val createdAt: Long = System.currentTimeMillis(),
    val highlightColor: String? = null,
    val kind: String = KIND_NOTE
) {
    val progressPercent: Int
        get() = (progress * 100).toInt().coerceIn(0, 100)

    companion object {
        const val KIND_NOTE = "note"
        const val KIND_QUOTE = "quote"
    }
}
