package com.fabledsword.minstrel.models.wire

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
 * One user's individual report under an aggregated quarantine row.
 * Mirrors Flutter's `AdminQuarantineReport` /
 * `internal/api/admin_quarantine.go` reportView.
 */
@Serializable
data class AdminQuarantineReportWire(
    @SerialName("user_id") val userId: String = "",
    val username: String = "",
    val reason: String = "",
    val notes: String? = null,
    @SerialName("created_at") val createdAt: String = "",
)

/**
 * One row of `GET /api/admin/quarantine` — all reports against a
 * single track collapsed into per-reason counts plus the underlying
 * per-user reports. Mirrors `adminQueueRowView`.
 */
@Serializable
data class AdminQuarantineItemWire(
    @SerialName("track_id") val trackId: String = "",
    @SerialName("track_title") val trackTitle: String = "",
    @SerialName("artist_name") val artistName: String = "",
    @SerialName("album_title") val albumTitle: String = "",
    @SerialName("album_id") val albumId: String = "",
    @SerialName("lidarr_album_mbid") val lidarrAlbumMbid: String? = null,
    @SerialName("report_count") val reportCount: Int = 0,
    @SerialName("latest_at") val latestAt: String = "",
    @SerialName("reason_counts") val reasonCounts: Map<String, Int> = emptyMap(),
    val reports: List<AdminQuarantineReportWire> = emptyList(),
)
