import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

/**
 * DTO used to update the theme preference for a specific user.
 *
 * Ensures both user identification and the new theme value are provided.
 */
export class UpdateThemeDto {
  /**
   * Identifier of the user whose theme is being updated.
   *
   * Required field:
   * - Must be a non-empty string.
   * - Typically corresponds to a user ID in the system.
   */
  @ApiProperty()
  @IsNotEmpty() // Field cannot be empty
  @IsString() // Must be a string
  user_id: string;

  /**
   * Theme name or identifier to be applied for the user.
   *
   * Required field:
   * - Must be a non-empty string.
   * - Represents the theme preference (e.g., "dark", "light").
   */
  @ApiProperty()
  @IsNotEmpty()
  @IsString()
  theme: string;
}
