package com.fabledsword.minstrel.cache.db.entities

import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.datetime.Clock
import kotlinx.datetime.Instant

/**
 * Cache row for one album. Mirrors `flutter_client/lib/cache/db.dart`'s
 * `CachedAlbums` Drift table.
 */
@Entity(tableName = "cached_albums")
data class CachedAlbumEntity(
    @PrimaryKey val id: String,
    val artistId: String,
    val title: String,
    val sortTitle: String,
    val releaseDate: String? = null,
    val coverPath: String? = null,
    val mbid: String? = null,
    val fetchedAt: Instant = Clock.System.now(),
)
