/*
 * Book's Story — free and open-source Material You eBook reader.
 * Copyright (C) 2024-2026 Acclorite
 * SPDX-License-Identifier: GPL-3.0-only
 */

package org.dueattendant149.bookshelf.data.local.dto

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

@Entity(
    tableName = "cached_file",
    indices = [Index("bookId"), Index("type")]
)
data class CachedFileEntity(
    @PrimaryKey(autoGenerate = true)
    val id: Int = 0,
    val bookId: Int,
    val type: String,
    val remoteUrl: String,
    val localPath: String? = null,
    val status: String = "pending",
    val progress: Float = 0f,
    val createdAt: Long = System.currentTimeMillis(),
)
