package com.pixelized.biblib.database.crossref

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

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