- Columna username (unique, nullable) en auth.users - Campo username en CreateUserDto y UpdateUserDto Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsEnum, IsUUID, IsString, IsOptional, IsObject } from 'class-validator';
|
|
import { FavoriteItemType } from '../../../entities/user-favorite.entity';
|
|
|
|
export class CreateFavoriteDto {
|
|
@ApiProperty({ description: 'Item ID to favorite', example: 'f47ac10b-58cc-4372-a567-0e02b2c3d479' })
|
|
@IsUUID()
|
|
itemId: string;
|
|
|
|
@ApiProperty({ description: 'Type of item', enum: FavoriteItemType, example: FavoriteItemType.PLACE })
|
|
@IsEnum(FavoriteItemType)
|
|
itemType: FavoriteItemType;
|
|
|
|
@ApiPropertyOptional({ description: 'Item name for display', example: 'Zona Colonial' })
|
|
@IsOptional()
|
|
@IsString()
|
|
itemName?: string;
|
|
|
|
@ApiPropertyOptional({ description: 'Item image URL', example: 'https://example.com/image.jpg' })
|
|
@IsOptional()
|
|
@IsString()
|
|
itemImageUrl?: string;
|
|
|
|
@ApiPropertyOptional({ description: 'Additional item metadata' })
|
|
@IsOptional()
|
|
@IsObject()
|
|
itemMetadata?: Record<string, any>;
|
|
|
|
@ApiPropertyOptional({ description: 'User notes', example: 'Must visit this place!' })
|
|
@IsOptional()
|
|
@IsString()
|
|
notes?: string;
|
|
}
|