package com.social.media.application.user.command;

import com.social.media.domain.user.valueobject.UserId;
import com.social.media.domain.shared.enums.UserStatus;
import com.social.media.domain.shared.enums.UserType;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * Command to update an existing user
 */
public record UpdateUserCommand(
    @NotNull(message = "User ID is required")
    UserId userId,
    
    @Size(max = 100, message = "User name must not exceed 100 characters")
    String name,
    
    @Email(message = "Invalid email format")
    String email,
    
    @Size(max = 20, message = "Phone must not exceed 20 characters")
    String phone,
    
    @Size(max = 100, message = "Position must not exceed 100 characters")
    String position,
    
    @Size(max = 100, message = "Department must not exceed 100 characters")
    String department,
    
    UserStatus status,
    
    UserType userType,  // Changed from 'type' to 'userType' for clarity
    
    Boolean whatsappEnabled,
    
    String avatarUrl,
    
    // ID of the user performing the update (for validation purposes)
    UserId updatedBy
) {}

