package com.fabledsword.minstrel.models

/**
 * Domain shape for one admin-issued registration invite. Mirrors
 * `flutter_client/lib/models/invite.dart Invite` and the server's
 * `inviteResp` from `internal/api/admin_invites.go`.
 *
 * `invitedBy` and `redeemedBy` are UUIDs of users (not usernames);
 * the server doesn't denormalise. TTL is hardcoded server-side at
 * 24h — admins can only customise the optional `note`.
 */
data class Invite(
    val token: String,
    val invitedBy: String,
    val note: String?,
    val createdAt: String,
    val expiresAt: String,
    val redeemedAt: String? = null,
    val redeemedBy: String? = null,
) {
    val isRedeemed: Boolean get() = redeemedAt != null
}
