package models.requests;

import java.util.Set;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.With;
import io.swagger.v3.oas.annotations.media.Schema;
import models.enums.ProfileEnum;

@With
@Schema(description = "Request to update user")
public record UpdateUserRequest(
                @Schema(description = "Name of the user", example = "John Doe", requiredMode = Schema.RequiredMode.REQUIRED)
                @Size(min = 3, max = 50, message = "Name must contain between 3 and 50 characters")
                String name,

                @Schema(description = "Email of the user", example = "rayanvix@gmail.com")
                @Email(message = "Invalid email format")
                @Size(min = 6, max = 50, message = "Email must contain between 6 and 50 characters")
                String email,

                @Schema(description = "Password of the user", example = "P@ssw0rd!", requiredMode = Schema.RequiredMode.REQUIRED)
                @Size(min = 6, max = 20, message = "Password must contain between 6 and 20 characters")
                String password,

                @Schema(description = "Profiles assigned to the user", example = "[\" ROLE_ADMIN \", \"ROLE_CUSTOMER \" ]", requiredMode = Schema.RequiredMode.REQUIRED)
                Set<ProfileEnum> profiles) {
}
