package de.krisenvorrat.server.model

import kotlinx.serialization.Serializable

@Serializable
internal data class LoginRequest(val username: String, val password: String)

@Serializable
internal data class LoginResponse(
    val accessToken: String,
    val refreshToken: String,
    val userId: String,
    val username: String
)

@Serializable
internal data class RefreshRequest(val refreshToken: String)

@Serializable
internal data class UserDto(
    val id: String,
    val username: String,
    val createdAt: Long,
    val isAdmin: Boolean,
    val inventoryId: String? = null
)

@Serializable
internal data class CreateUserRequest(val username: String, val password: String)

@Serializable
internal data class UpdatePasswordRequest(val password: String)

@Serializable
internal data class InventoryWithUsersDto(
    val inventoryId: String,
    val users: List<UserDto>
)

@Serializable
internal data class AssignInventoryRequest(val inventoryId: String)

