import {
  IsEnum,
  IsString,
  IsOptional,
  IsDateString,
  IsObject,
  IsNotEmpty,
  IsArray,
  ArrayMinSize,
} from 'class-validator';
import { ActivityType } from '../../../database/entities/activity.entity';

export class CreateBulkActivitiesDto {
  @IsArray()
  @ArrayMinSize(1, { message: 'At least one child ID is required' })
  @IsString({ each: true })
  childIds: string[];

  @IsEnum(ActivityType)
  @IsNotEmpty()
  type: ActivityType;

  @IsDateString()
  @IsNotEmpty()
  startedAt: string;

  @IsDateString()
  @IsOptional()
  endedAt?: string;

  @IsString()
  @IsOptional()
  notes?: string;

  @IsObject()
  @IsOptional()
  metadata?: Record<string, any>;
}

export { ActivityType };
