package com.pixelized.biblib.database.crossref

import androidx.room.ColumnInfo
import androidx.room.Entity
import com.pixelized.biblib.database.data.BookDbo
import com.pixelized.biblib.database.data.GenreDbo

@Entity(tableName = BookGenreCrossRef.TABLE, primaryKeys = [BookDbo.ID, GenreDbo.ID])
data class BookGenreCrossRef(
    @ColumnInfo(name = BookDbo.ID)
    val bookId: Int,
    @ColumnInfo(name = GenreDbo.ID, index = true)
    val genreId: Int,
) {
    companion object {
        const val TABLE = "BookGenreCrossRef"
    }
}