import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import {
  IsString,
  IsOptional,
  IsDateString,
  IsArray,
  IsEnum,
} from 'class-validator';
import { MeetingStatus } from '@prisma/client';

/**
 * DTO for creating a new morning meeting
 */
export class CreateMeetingDto {
  @ApiProperty({
    description: 'Department ID for the meeting',
    example: 'clq1234567890abcdef',
  })
  @IsString()
  departmentId: string;

  @ApiProperty({
    description: 'Meeting date (YYYY-MM-DD)',
    example: '2024-01-15',
  })
  @IsDateString()
  date: string;

  @ApiPropertyOptional({
    description: 'Conductor/facilitator user ID',
    example: 'clq1234567890abcdef',
  })
  @IsOptional()
  @IsString()
  conductorId?: string;

  @ApiPropertyOptional({
    description: 'Array of participant user IDs',
    example: ['clq123', 'clq456'],
    type: [String],
  })
  @IsOptional()
  @IsArray()
  @IsString({ each: true })
  participants?: string[];

  @ApiPropertyOptional({
    description: 'Meeting notes',
    example: 'Weekly status review',
  })
  @IsOptional()
  @IsString()
  notes?: string;

  @ApiPropertyOptional({
    description: 'Initial meeting status',
    enum: MeetingStatus,
    default: 'SCHEDULED',
  })
  @IsOptional()
  @IsEnum(MeetingStatus)
  status?: MeetingStatus;
}
