package com.social.media.application.company.command;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

import java.util.UUID;

/**
 * Command to create a new company according to the new domain model.
 */
public record CreateCompanyCommand(
    @NotBlank(message = "CNPJ is required")
    @Size(min = 14, max = 18, message = "CNPJ must be between 14 and 18 characters")
    String cnpj,
    
    @NotBlank(message = "Company name is required")
    @Size(max = 200, message = "Company name must not exceed 200 characters")
    String companyName,
    
    @Size(max = 200, message = "Trade name must not exceed 200 characters")
    String tradeName,
    
    @NotBlank(message = "Email is required")
    @Email(message = "Invalid email format")
    String email,
    
    @Size(max = 20, message = "Phone must not exceed 20 characters")
    String phoneNumber,
    
    @Size(max = 255, message = "Website must not exceed 255 characters")
    String website,
    
    @Size(max = 100, message = "Activity sector must not exceed 100 characters")
    String activitySector,
    
    @NotBlank(message = "Plan is required")
    String plan, // Will be converted to enum in handler
    
    // Address fields
    @Size(max = 200, message = "Street must not exceed 200 characters")
    String street,
    
    @Size(max = 20, message = "Number must not exceed 20 characters")
    String number,
    
    @Size(max = 100, message = "Complement must not exceed 100 characters")
    String complement,
    
    @Size(max = 100, message = "Neighborhood must not exceed 100 characters")
    String neighborhood,
    
    @Size(max = 100, message = "City must not exceed 100 characters")
    String city,
    
    @Size(max = 2, message = "State must be 2 characters")
    String state,
    
    @Size(max = 10, message = "Postal code must not exceed 10 characters")
    String postalCode,
    
    @Size(max = 50, message = "Country must not exceed 50 characters")
    String country,
    
    UUID createdByUserId
) {}

