package com.jishisongfu.duobibi.data.api

import com.jishisongfu.duobibi.floating.NodeDto
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class ClusterDto(
    val id: Long,
    val title: String,
)

@Serializable
data class ParseRequest(
    @SerialName("package_name") val packageName: String,
    val tree: NodeDto? = null,
    val clusters: List<ClusterDto> = emptyList(),
)

@Serializable
data class ParseResponse(
    val title: String,
    val price: Double,
    @SerialName("source_app") val sourceApp: String,
    @SerialName("cluster_id") val clusterId: Long? = null,
    @SerialName("typical_price") val typicalPrice: Double? = null,
)

@Serializable
data class QuickQuoteRequest(
    val title: String,
    val clusters: List<ClusterDto> = emptyList(),
)

@Serializable
data class QuickQuoteResponse(
    val title: String,
    @SerialName("typical_price") val typicalPrice: Double,
    @SerialName("cluster_id") val clusterId: Long? = null,
)
