package com.keylightpiano.pianotimeline.data.local

import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "recordings")
data class RecordingEntity(
    @PrimaryKey val id: String,
    val date: String,
    val artist: String,
    val title: String,
    val extraInfo: String,
    val performanceNumber: Int,
    val totalPerformances: Int,
    val fileName: String,
    val midiFileName: String?,
    val durationSeconds: Double,
    val soundStartSeconds: Double,
    val fileSize: Long,
    val cachedAudioPath: String? = null,
    val cachedMidiPath: String? = null,
    // -- local-only state (never sent by server) --
    val isFavorite: Boolean = false,
    val isNew: Boolean = false,
    // Epoch millis when this was favorited; 0 when not favorited.
    // Used to order the favorites group in insertion order (oldest first).
    val favoritedAt: Long = 0L
)
