package band.effective.office.backend.core.domain.model

import jakarta.validation.constraints.Email
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.Size
import java.time.LocalDateTime
import java.util.UUID

/**
 * Represents a user in the system.
 */
data class User(
    val id: UUID = UUID.randomUUID(),

    @field:NotBlank(message = "Username is required")
    @field:Size(min = 3, max = 255, message = "Username must be between 3 and 50 characters")
    val username: String,

    @field:NotBlank(message = "Email is required")
    @field:Email(message = "Email should be valid")
    val email: String,

    @field:NotBlank(message = "First name is required")
    val firstName: String,

    @field:NotBlank(message = "Last name is required")
    val lastName: String,

    val createdAt: LocalDateTime = LocalDateTime.now(),

    val updatedAt: LocalDateTime = LocalDateTime.now(),

    val active: Boolean = true,

    val role: String = "",

    val avatarUrl: String = "",

    val tag: String = ""
)
