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

export class ActivityItemDTO {
  @ApiProperty()
  @IsString()
  id: string = '';

  @ApiProperty({ enum: ['race', 'league', 'team', 'driver', 'platform'] })
  @IsEnum(['race', 'league', 'team', 'driver', 'platform'])
  type: 'race' | 'league' | 'team' | 'driver' | 'platform' = 'race';

  @ApiProperty()
  @IsString()
  message: string = '';

  @ApiProperty()
  @IsString()
  time: string = '';

  @ApiProperty({ required: false })
  @IsOptional()
  @IsNumber()
  impressions?: number;
}