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

export class AddMemberDto {
  @ApiProperty({ example: '550e8400-e29b-41d4-a716-446655440000' })
  @IsUUID()
  @IsNotEmpty()
  userId!: string;

  @ApiProperty({
    example: 'MEMBER',
    enum: ['ADMIN', 'MEMBER', 'VIEWER'],
    required: false,
  })
  @IsOptional()
  @IsString()
  @IsIn(['ADMIN', 'MEMBER', 'VIEWER'])
  role?: string;
}
