package com.fabledsword.minstrel.models.wire

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

/**
 * One admin-side user row. Mirrors `adminUserView` from
 * `internal/api/admin_users.go`. Distinct from the user-scoped /me
 * profile shape because admin endpoints expose `auto_approve_requests`
 * and the canonical `created_at`.
 */
@Serializable
data class AdminUserWire(
    val id: String = "",
    val username: String = "",
    @SerialName("display_name") val displayName: String? = null,
    @SerialName("is_admin") val isAdmin: Boolean = false,
    @SerialName("auto_approve_requests") val autoApproveRequests: Boolean = false,
    @SerialName("created_at") val createdAt: String = "",
)

/**
 * Envelope of `GET /api/admin/users`. Server wraps the list in
 * `{"users": [...]}`; the repository unwraps before mapping.
 */
@Serializable
data class AdminUsersListWire(
    val users: List<AdminUserWire> = emptyList(),
)
