TokenReassignment.kt
// EV Supervision Lite — built by Kevin Vavelin, Codetics
// https://codetics.fr
// Copyright (c) 2026 Kevin Vavelin, Codetics
// SPDX-License-Identifier: LicenseRef-Codetics-Attribution-1.0
package fr.codetics.ev_server.models.tokens
import java.time.Instant
import java.util.UUID
import tools.jackson.databind.PropertyNamingStrategies
import tools.jackson.databind.annotation.JsonNaming
/** Moves a badge to another employee (null leaves it unassigned), keeping who did it and why. */
data class TokenReassignment(
val userId: UUID? = null,
val reason: String? = null,
/** Disable the badge until its new holder confirms receiving it. */
val disable: Boolean = false,
)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy::class)
data class TokenAssignmentResponse(
val id: UUID,
val tokenUid: String,
val fromUserId: UUID?,
val fromUserName: String?,
val toUserId: UUID?,
val toUserName: String?,
val actorId: UUID?,
val actorName: String?,
val reason: String?,
val createdAt: Instant,
)