package com.fabledsword.minstrel.models

import kotlinx.serialization.Serializable

/**
 * The caller's identity as returned by `POST /api/auth/login`. Narrow
 * field set — no password hash, no api token, no Subsonic password —
 * matches the server's `UserView` envelope.
 *
 * `@Serializable` so AuthStore can persist the current user across
 * cold restarts via the JSON-encoded `userJson` column on
 * `AuthSessionEntity`.
 */
@Serializable
data class UserRef(
    val id: String,
    val username: String,
    val isAdmin: Boolean = false,
)
