package com.pixelized.biblib.network.data.response

import com.google.gson.annotations.SerializedName

data class BookListResponse(
    @SerializedName("lastUpdated")
    val lastUpdated: String? = null,        // "2020-12-16T23:50:34.258Z"
    @SerializedName("books")
    val data: List<Book>? = null,
) : ErrorResponse() {
    data class Book(
        @SerializedName("book_id")
        val book_id: Int?,                  //"book_id": 9670,
        @SerializedName("book_title")
        val book_title: String?,            //"book_title": "L’Inconnu de la forêt",
        @SerializedName("book_sort")
        val book_sort: String?,             //"book_sort": "L’Inconnu de la forêt",
        @SerializedName("author_sort")
        val author_sort: List<String>?,     //"author_sort": ["Coben, Harlan"],
        @SerializedName("book_has_cover")
        val book_has_cover: Int?,           //"book_has_cover": 1,
        @SerializedName("book_date")
        val book_date: String?,             //"book_date": "2020-10-15T06:21:32.000Z",
        @SerializedName("last_modified")
        val last_modified: String?,         //"last_modified": "2020-11-08T17:15:23.916Z",
        @SerializedName("author_id")
        val author_id: List<String>?,       //"author_id": ["214"],
        @SerializedName("author_name")
        val author_name: List<String>?,     //"author_name": ["Harlan Coben"],
        @SerializedName("lang_id")
        val lang_id: String?,               //"lang_id": "1",
        @SerializedName("lang_code")
        val lang_code: String?,             //"lang_code": "fra",
        @SerializedName("rating")
        val rating: String?,                //"rating": null, TODO: examples are all null, type unknowed
        @SerializedName("series_name")
        val series_name: String?,           //"series_name": null,
        @SerializedName("series_sort")
        val series_sort: String?,           //"series_sort": null,
        @SerializedName("book_series_index")
        val book_series_index: Float?,      //"book_series_index": 1,
    )
}