package com.fabledsword.minstrel.models.wire

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

/**
 * Wire shape for one invite row.
 * `invited_by`/`redeemed_by` carry user UUIDs.
 */
@Serializable
data class InviteWire(
    val token: String = "",
    @SerialName("invited_by") val invitedBy: String = "",
    val note: String? = null,
    @SerialName("created_at") val createdAt: String = "",
    @SerialName("expires_at") val expiresAt: String = "",
    @SerialName("redeemed_at") val redeemedAt: String? = null,
    @SerialName("redeemed_by") val redeemedBy: String? = null,
)

/**
 * Envelope for `GET /api/admin/invites` — `{"invites": [...]}`.
 * The single-invite create endpoint returns a bare [InviteWire], so
 * the list endpoint is the only place this envelope shows up.
 */
@Serializable
data class AdminInvitesListWire(
    val invites: List<InviteWire> = emptyList(),
)
